Home Forums Add-ons Repeater Field ACF Filed Update/Save Button


ACF Filed Update/Save Button

  • Hi James,

    How are you? i hope, you help me on this issue 🙂

    I have created front-end form for my customer, also i used ACF repeater field. I want to display ‘Update/Save’ button for save the form value instant. like, when my customer fillup the form they click “Update/save” button, than the value save into database.

    Please see this attached screenshot :

    if i used this code, than show the update/save button. but when i click the button, nothing happen 🙁 🙁 Please help me. I need this button for save repeater filed value.

    <?php acf_form(array(
    ‘post_id’ => 123,
    ‘post_title’ => false,
    ‘submit_value’ => ‘Save’
    )); ?>

  • Hi @officialsabbirr

    I hope you are having an awesome 2018 so far.

    The first thing we will need to establish is whether you have the acf_form_head() function at the very top of your page template. The post id that you are passing also suggests that you are trying to modify a certain post, is this right?

    Perhaps you could share the complete code that you have in your page template so that I can advise further?

  • Hello James,

    Happy new year.

    Thanks for your message. I’m using Advanced Custom Fields plugin to create some extra fields in WordPress User Profile. I want to update those user fields in frontend.
    This code is displaying all the ACF fields in a form. But they are not updating in the current logged in user profile. When I click on Update button all the fields should be updated in current logged in user profile.

    I have sunglass online selling website. that’s why i need customer glasses prescription info. so i created prescription form for my customer. customer can submit all proscription details via ACF. this form show into the checkout page.

    Prescription form Screenshot :

    Now i see the update button , but when i click to update it’s show me error.

    Here is the error screenshot :

    NB: This form show only for user . who registered the site.

    Here is the full code:
    <?php acf_form_head(); ?>

    <?php $options = array(
    	    'post_id' => 'user_'.$current_user->ID,
    	    'field_groups' => array(9871),
    	    'form' => true, 
    	    'return' => add_query_arg( 'updated', 'true', get_permalink() ), 
    	    'html_before_fields' => '',
    	    'html_after_fields' => '',
    	    'submit_value' => 'Update' 
    	acf_form( $options );

    I am not good with coding. so please help me. thank you again.

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

The topic ‘ACF Filed Update/Save Button’ is closed to new replies.