I have a checkbox created using ACF in my product admin page. I have successfully added these checkboxes to the frontend but they are not updating when the vendor saves the form.
Here is my custom checkbox information...
field meta name: _personal_options Array options: name: Name message: Message Field key: field_5b54938f699a9
Here is my code that I added to the frontend product edit page/form
<div class="dokan-form-group">
<label>
<input name="fields[field_5b54938f699a9][]" type="checkbox" id="acf-field-_personal_options" class="<?php echo 'id_' . $store_id; ?>" value="name" <?php checked('name', get_user_meta($store_id, 'acf-field-_personal_options', true), $echo = true) ?>/><?php _e('Enable gift name option', 'dokan');?>
</label>
</div>
<div class="dokan-form-group">
<label>
<input name="fields[field_5b54938f699a9][]" type="checkbox" id="acf-field-_personal_options-message" class="<?php echo 'id_' . $store_id; ?>" value="message" <?php checked('message', get_user_meta($store_id, 'acf-field-_personal_options-message', true), $echo = true) ?>/><?php _e('Enable gift message option', 'dokan');?>
</label>
</div>
I have managed to get normal text fields to work fine but struggling with checkboxes. Here is my working text fields:
<label for="_personal_name_field" class="form-label">Gift name</label>
<?php dokan_post_input_box( $post_id, '_personal_name_field', array( 'placeholder' => 'Enter name...' ) ); ?>
<label for="_personal_message_field" class="form-label">Gift message</label>
<?php dokan_post_input_box( $post_id, '_personal_message_field', array( 'placeholder' => 'Enter message...' ), 'textarea' ); ?>
Really really need help with this.