Support

Account

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

  • 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 : http://prntscr.com/hv3rmn

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

    Here is the error screenshot : http://prntscr.com/hv3s31

    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.