Multiselect fields value not saving in database
-
Hi, I’m trying to add a multiselect custom field to my job submission form and I checked out one text field example in documentation. The text field example worked fine. But I’m facing an issue in multiselect field ……….
I am able to select multiple values, But after the submission of the job form, selected options are not saved on the database. It just stores ‘1’.
Also, I have used the
submit_job_form_save_job_data filter
hook to check submitted values. At this point, I am getting values of selected options but not able to save them in the database.function test_multiselect_field_frontend( $fields ) { $fields['job']['test_job_borads'] = array( 'label' => __( 'Test Job Borads', 'job_manager' ), 'type' => 'multiselect', 'required' => false, 'options' => array( 'flipkart' => 'Flipkart', 'amazon' => 'Amazon', 'naukri' => 'Naukri', ), 'description' => 'Select Companies', 'priority' => 14, ); return $fields; } add_filter( 'submit_job_form_fields', 'test_multiselect_field_frontend',10,1 );
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Multiselect fields value not saving in database’ is closed to new replies.