Title: Error message: Cannot redeclare custom_submit_job_form_fields()
Last modified: November 24, 2021

---

# Error message: Cannot redeclare custom_submit_job_form_fields()

 *  Resolved [waffeltje](https://wordpress.org/support/users/waffeltje/)
 * (@waffeltje)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/error-message-cannot-redeclare-custom_submit_job_form_fields/)
 * Good morning,
 * I’m using the plugin Code Snippets to add custom fields to job_listings. Now,
   I’m receiving the following php error:
 * > Error message: Cannot redeclare custom_submit_job_form_fields() (previously
   > declared in /var/www/vhosts/xxx/wp-content/plugins/code-snippets/php/snippet-
   > ops.php(469) : eval()’d code:6)
 * There is a conflict between WP Job Manager and the snippet I added (I’ve added
   numerous custom job fields using snippets and they used to work fine).
 * I’m adding custom fields using the two follOwing snippets:
 *     ```
       add_filter( 'job_manager_job_listing_data_fields', 'admin_add_stageniveau_field' );
       function admin_add_stageniveau_field( $fields ) {
         $fields['_job_stageniveau'] = array(
           'label'       => __( 'Opleiding', 'job_manager' ),
           'type'        => 'select',
       	'options' => array('MBO' => 'MBO', 'HBO' => 'HBO', 'Universiteit' => 'Universiteit', 'Anders' => 'Anders'),
           'placeholder' => '',
           'description' => ''
         );
         return $fields;
       }
       ```
   
 *     ```
       add_filter( 'job_manager_job_listing_data_fields', 'admin_add_startdatum_field' );
       function admin_add_startdatum_field( $fields ) {
         $fields['_job_startdatum'] = array(
           'label'       => __( 'Startdatum', 'job_manager' ),
           'type'        => 'select',
       	'options' => array('Z.s.m.' => 'Z.s.m.', 'Flexibel' => 'Flexibel', 'Z.s.m. & flexibel' => 'Z.s.m. & Flexibel', 'Oktober 2020' => 'Oktober 2020', 'November 2020' => 'November 2020', 'December 2020' => 'December 2020', 'Januari 2021' => 'Januari 2021', 'Februari 2021' => 'Februari 2021', 'Maart 2021' => 'Maart 2021', 'April 2021' => 'April 2021', 'Mei 2021' => 'Mei 2021', 'Juni 2021' => 'Juni 2021', 'Juli 2021' => 'Juli 2021', 'Augustus 2021' => 'Augustus 2021', 'September 2021' => 'September 2021'),
           'placeholder' => '',
           'description' => ''
         );
         return $fields;
       }
       ```
   
 * Any suggestions how to resolve this error? The error seems to be around the WP
   Job Manager hook custom_submit_job_form_fields() ([https://wpjobmanager.com/document/editing-job-submission-fields/](https://wpjobmanager.com/document/editing-job-submission-fields/)).
 * Thanks in advance.
 * Bèrke

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

 *  Plugin Support [bindlegirl (a11n)](https://wordpress.org/support/users/bindlegirl/)
 * (@bindlegirl)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/error-message-cannot-redeclare-custom_submit_job_form_fields/#post-15105865)
 * Hi Bèrke ( [@waffeltje](https://wordpress.org/support/users/waffeltje/) ) !
 * We won’t be able to help troubleshoot custom code pre our [Support Policy](https://wpjobmanager.com/support-policy/).
   
   That being said, the `Cannot redeclare..` error means you are using the same 
   function twice and yous shouldn’t do that.
 *  Plugin Support [Jay](https://wordpress.org/support/users/bluejay77/)
 * (@bluejay77)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/error-message-cannot-redeclare-custom_submit_job_form_fields/#post-15144866)
 * Hi there,
 * It has been more than one week since we have heard from you, so I’m marking this
   topic as resolved.
 * But if you have any further questions or need some more help, you’re welcome 
   to reply here or open another thread.
 *  Thread Starter [waffeltje](https://wordpress.org/support/users/waffeltje/)
 * (@waffeltje)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/error-message-cannot-redeclare-custom_submit_job_form_fields/#post-15146283)
 * Good morning,
    Sorry for the late reply. Indeed, the function custom_submit_job_form_fields()
   was existing twice. After renaming one of the functions the problem was resolved.
   Thanks [@bindlegirl](https://wordpress.org/support/users/bindlegirl/) for your
   advice. Regards.
 *  [Gaurav](https://wordpress.org/support/users/gaurav984/)
 * (@gaurav984)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/error-message-cannot-redeclare-custom_submit_job_form_fields/#post-15149930)
 * That’s great to hear! Thanks for letting us know.

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

The topic ‘Error message: Cannot redeclare custom_submit_job_form_fields()’ 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/)

 * 4 replies
 * 4 participants
 * Last reply from: [Gaurav](https://wordpress.org/support/users/gaurav984/)
 * Last activity: [4 years, 5 months ago](https://wordpress.org/support/topic/error-message-cannot-redeclare-custom_submit_job_form_fields/#post-15149930)
 * Status: resolved