Resolved – admin_init and AJAX heartbeart was causing the issue
Hi Christian,
Thanks for this, I tried the clone field but it wasent doing what I wanted to achieve.
This would only replicate the fields. Not the questions I have set within the post type.
So I set question A, B and C within a report.
Then when I visit the report, I want to display Question A, B and C which should be prefilled on the report.
I have achived this on the frontend already using ‘get_fields( $report_id )’;
Just trying to suss out how to save the values of the input from the user end incase reordering within the Repeater occurs.
Ignore my previous post – I managed to fix it!
Thanks John.
Thank you for your reply John,
YES, this solved my issues. But because I am now doing flexible content within flexible content (both using cloned fields)
The data is not being pulled? It is storing in the database correctly but nothing is being pulled..
while ( have_rows( $id ) ) : the_row();
if( get_row_layout() == 'content' ):
flexi_get_template_part( 'content' );
elseif( get_row_layout() == 'accordian' ):
flexi_get_template_part( 'accordian' );
elseif( get_row_layout() == 'contact_form' ):
flexi_get_template_part( 'contact-form' );
elseif( get_row_layout() == 'columns' ):
//THIS IS WHERE I AM TRYING TO LOOP THROUGH MY CLONED SUB COLUMNS.
$arr = get_defined_vars();
print_r($arr);
endif;
endwhile;
If you see in the columns, all it returns is $id string. It seems that nested flexible content is not supported?
No mine uses a custom CSS grid system – but you change the column width classes in the settings
$columns[‘six’] = ‘six columns’;
If you wanted to use bootstrap you would just change it to:
$columns[‘six’] = ‘col-lg-6’;
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.