Support

Account

Home Forums Add-ons Repeater Field ACF frontend not saving repeater fields

Unread

ACF frontend not saving repeater fields

  • Hi Guys,

    I’ve got a front end form with repeaters on it. If you update the repeaters on the back-end they save absolutely fine. On the front end form the repeaters wipe clean all data held within them. All other fields work absolutely fine. What am I doing wrong?

    ACF Version 5.12.3

    /* ACF Edit Clinic Form */
    
    # Change Post Title Label
    
    add_filter( 'acf/get_valid_field', 'change_input_labels');
    function change_input_labels($field) {
    		
    	if($field['name'] == '_post_title') {
    		$field['label'] = 'Clinic Name';
    	}
    		
    	return $field;
    		
    }
    
    # Background Data
    
    $uid = get_current_user_id();
    $user = 'user_'.$uid;
    $cid = get_field('clinic_name', $user);
    
    # Form Settings
    
    $select_fields = array(
    
    	  'field_610aaed60c024', // Clinic Details TAB
    	  'field_5e7a69a5cbdc3', // Postal Address
    	  'field_5e7a6978cbdc1', // Email Address
    	  'field_5e7a6993cbdc2', // Phone Number
    	  'field_5e7a69bccbdc4', // Website Address
    	  'field_62d2de4e2b714', // Business Registration
    	  'field_62d2dc9b302c2', // VAT Registration
    
    	  'field_62d2dbdb8a36c', // Pricing TAB
    	  'field_62d2df953a6b4', // Currency Symbol
    	  'field_62d2dbf4302bc', // Small Animal Session Fees
    	  'field_62d2dc86302bf', // Equine Session Fees
    	  'field_62d2e5d7f3879', // Travel Fees
    	  'field_62d2e69cf387a', // Travel Unit
    	  'field_62d2e474064b7', // Additional Fees
    	  'field_62d2e7fa81b94', // Discounts
    
    );
    
    $settings = array(
    
    	'id'			=> 'edit-clinic',
    	'post_id'       => $cid,
    	'fields'		=> $select_fields,
    	'post_title'    => true,
    	'post_content'  => false,
    	'uploader' 		=> 'basic',
    	'html_updated_message'  => '<div id="message" class="updated"><p>Your records have been updated</p></div>',
    	'submit_value' 	=> __("Save Details", 'acf'),
    
    );
    
    # Register Form
    
    acf_register_form($settings);
    
    # Generate Form
    
    acf_form($settings);

    Repeater fields are:

    'field_62d2dbf4302bc', // Small Animal Session Fees
    'field_62d2dc86302bf', // Equine Session Fees
    'field_62d2e474064b7', // Additional Fees
    'field_62d2e7fa81b94', // Discounts

    Many thanks,

    Tom

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.