I created a Custom Field using GF_Field and it seems like the data isn’t being saved when using a Multipage Form using Ajax. It displays properly but when I move forward in the form to the next page it losses its selection (radio field) when I go back to its page. Also, it does not send the field to the form entry/submission. Im currently using this function and using Timber/Twig to render the view.
if (class_exists('GF_Field')) {
class GF_Field_Service_Scheduler extends GF_Field_Radio {
public $type = 'service_scheduler';
public function get_form_editor_field_title() {
return esc_attr__('Service Scheduler', 'txtdomain');
}
public function get_form_editor_field_settings() {
return [
'label_setting',
'description_setting',
];
}
public function is_value_submission_array() {
return true;
}
public function get_field_input($form, $value = '', $entry = null) {
if ($this->is_form_editor()) {
return '';
}
$products = carbon_get_theme_option('crb_ss_selectable_items');
$id = (int) $this->id;
$form_id = $form['id'];
$view = Timber::compile('views/templates/blocks/request-form.twig', array(
'products' => $products,
'input_id' => $id,
'form_id' => $form_id,
));
return $view;
// .. Rest of code for frontend and edit entry here...
}
}
GF_Fields::register( new GF_Field_Service_Scheduler() );
}```