Support

Account

Forum Replies Created

  • Remove the acf_form_head() from your function and add this to your functions.php

    add_action( 'init', function() {
    acf_form_head();
    });
  • Have you included acf_form_head() at the top of the page?

  • Are you adding this into the default woocommerce account dashboard?

    If so you might need ‘form’ => false

    So multiple forms are not rendered in the dom. ie;

    <form action="{default_wc_account_url}" method="POST">
      <form action="{ACF_FORM}"> // your form is creating this.
      </form> // and this inside the default form.
    </form>
  • Add the below in your acf_form array.

    ‘post_title’ => ‘News Item ‘ . time(),

    When a new post is created it should be created with ‘News Item ‘ + unixt imestamp

  • Remove the init hook and try putting acf_form_head(); inside header.php

    I had a similar problem before.

  • 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’;

Viewing 10 posts - 1 through 10 (of 10 total)