Title: Multiselect fields value not saving in database
Last modified: January 22, 2022

---

# Multiselect fields value not saving in database

 *  Resolved [hariom61234](https://wordpress.org/support/users/hariom61234/)
 * (@hariom61234)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/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](https://wpjobmanager.com/document/tutorial-adding-a-salary-field-for-jobs/)
   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)

 *  Thread Starter [hariom61234](https://wordpress.org/support/users/hariom61234/)
 * (@hariom61234)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/multiselect-fields-value-not-saving-in-database/#post-15284643)
 * Also is it possible to have a custom multi-select checkbox field? Similar to 
   the term-checklist field which is present by default in the job listing custom
   post type.
    -  This reply was modified 4 years, 4 months ago by [hariom61234](https://wordpress.org/support/users/hariom61234/).
 *  Plugin Support [Jay](https://wordpress.org/support/users/bluejay77/)
 * (@bluejay77)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/multiselect-fields-value-not-saving-in-database/#post-15285922)
 * Hi [@hariom61234](https://wordpress.org/support/users/hariom61234/),
 * Thanks for your interest in WP Job Manager! Please note, we do not support customizations–
   you can refer to our Support Policy:
 * [https://wpjobmanager.com/support-policy/](https://wpjobmanager.com/support-policy/)
 * Specifically:
 * “We provide our products as-is. We cannot customize our products on-demand, nor
   can we support third-party customizations. A customization is anything that changes
   the way the products looks or functions relative to how we make our products 
   available to you. We can do our best to offer advice and guidance, and direct
   you to the appropriate resources if you require assistance with customization,
   but we don’t take responsibility or endorse any third-party solutions for customized
   products.”
 * We cannot review or debug your custom code, however, we can point you in the 
   right direction.
 * —
    You mentioned that you’re using the `submit_job_form_save_job_data` filter
   hook to check submitted values. Are these values of the selected options in an
   array or string format?
 * If the values are in an array, you could convert the array values into a comma
   separated string using that filter.
 * If that doesn’t work, you can create an issue on the WPJM repository, here:
 * [https://github.com/Automattic/WP-Job-Manager/issues](https://github.com/Automattic/WP-Job-Manager/issues)
 * I hope that helps!
 *  Thread Starter [hariom61234](https://wordpress.org/support/users/hariom61234/)
 * (@hariom61234)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/multiselect-fields-value-not-saving-in-database/#post-15286990)
 * I understand but all I need is a simple example of a custom field where I can
   select multiple checkboxes values. Is it too big an ask?
 *  [Gaurav](https://wordpress.org/support/users/gaurav984/)
 * (@gaurav984)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/multiselect-fields-value-not-saving-in-database/#post-15287016)
 * Hi [@hariom61234](https://wordpress.org/support/users/hariom61234/),
 * The issue is not with the code perse but how the code is saving the information
   to the database.
 * The `values` from the multi-select field need to be in a _string_ format and 
   not an array. If the values are in an array, convert the array values into a 
   comma-separated string using the filter.
 * If you need more help with this, please post an issue on our [Github repo here ](https://github.com/Automattic/WP-Job-Manager/issues)
   so that the developers can take a direct look and provide feedback.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Multiselect fields value not saving in database’ is closed to new replies.

 * ![](https://ps.w.org/wp-job-manager/assets/icon-256x256.gif?rev=2975257)
 * [WP Job Manager](https://wordpress.org/plugins/wp-job-manager/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-job-manager/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-job-manager/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-job-manager/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-job-manager/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-job-manager/reviews/)

## Tags

 * [multiselect](https://wordpress.org/support/topic-tag/multiselect/)

 * 4 replies
 * 3 participants
 * Last reply from: [Gaurav](https://wordpress.org/support/users/gaurav984/)
 * Last activity: [4 years, 4 months ago](https://wordpress.org/support/topic/multiselect-fields-value-not-saving-in-database/#post-15287016)
 * Status: resolved