Conversation
supportHi, is it possible to edit or hide the fields that are displayed on the “Submit Company” page? For example, I would like to change the name “Headquarters”. And can new fields be added? For example, more social media links like LinkedIn? Best, David
Hi @davidspeyer , You can customize submit company fields by using this filer : submit_company_form_fields You can get reference code here : https://wpjobmanager.com/document/developer-reference/code-snippets/editing-job-submission-fields/ Thanks, Abbas
Thank you very much!
Hi, for some reason this does not seem to work. I am using the following function: // Add your own function to filter the fields add_filter( 'submit_company_form_fields', 'custom_submit_company_form_fields' ); // This is your function which takes the fields, modifies them, and returns them // You can see the fields which can be changed here: https://github.com/mikejolley/WP-Job-Manager/blob/master/includes/forms/class-wp-job-manager-form-submit-job.php function custom_submit_company_form_fields( $fields ) { // Here we target one of the job fields (job_title) and change it's label $fields['company']['company_name']['label'] = "Custom Label"; // And return the modified fields return $fields; } What am I doing wrong? Thank you and kind regards, David
Hello @davidspeyer , You are using wrong field name. Please replace your line with below line and test. $fields[‘company_fields’][‘company_name’][‘label’] = “Custom Label”; You can refer here : https://github.com/madrasthemes/mas-wp-job-manager-company/blob/main/includes/forms/class-mas-wp-job-manager-company-form-submit-company.php#L119 Thanks, Abbas
Works fine. Thank you very much 🙂
Hi, one last thing regarding my original question: “And can new fields be added? For example, more social media links like LinkedIn?” I am able to add new fields to the frontend with the “submit_company_form_fields” function. But I cannot find any information on how to add fields to the backend and how to display those fields on the company page. Thank you very much for your help! Kind regards, David
Hi @davidspeyer , You can add option to backend and load fields in frontend by customizing below plugin files. plugins > mas-wp-job-manager-company > includes > class-mas-wp-job-manager-company-writepanels.php plugins > mas-wp-job-manager-company > includes > mas-wpjmc-template-functions.php Thanks, Abbas
Thank you Abbas! But such changes would be overwritten with future updates. So is it currently not possible to add your own fields? Best regards, David
Hi @davidspeyer , Yes, if you override the plugin files it will override when you update plugins. Thanks, Abbas
Hi @davidspeyer , You can customize submit company fields by using this filer : submit_company_form_fields You can get reference code here : https://wpjobmanager.com/document/developer-reference/code-snippets/editing-job-submission-fields/ Thanks, Abbas
Thank you very much!
Hi, for some reason this does not seem to work. I am using the following function: // Add your own function to filter the fields add_filter( 'submit_company_form_fields', 'custom_submit_company_form_fields' ); // This is your function which takes the fields, modifies them, and returns them // You can see the fields which can be changed here: https://github.com/mikejolley/WP-Job-Manager/blob/master/includes/forms/class-wp-job-manager-form-submit-job.php function custom_submit_company_form_fields( $fields ) { // Here we target one of the job fields (job_title) and change it's label $fields['company']['company_name']['label'] = "Custom Label"; // And return the modified fields return $fields; } What am I doing wrong? Thank you and kind regards, David
Hello @davidspeyer , You are using wrong field name. Please replace your line with below line and test. $fields[‘company_fields’][‘company_name’][‘label’] = “Custom Label”; You can refer here : https://github.com/madrasthemes/mas-wp-job-manager-company/blob/main/includes/forms/class-mas-wp-job-manager-company-form-submit-company.php#L119 Thanks, Abbas
Works fine. Thank you very much 🙂
Hi, one last thing regarding my original question: “And can new fields be added? For example, more social media links like LinkedIn?” I am able to add new fields to the frontend with the “submit_company_form_fields” function. But I cannot find any information on how to add fields to the backend and how to display those fields on the company page. Thank you very much for your help! Kind regards, David
Hi @davidspeyer , You can add option to backend and load fields in frontend by customizing below plugin files. plugins > mas-wp-job-manager-company > includes > class-mas-wp-job-manager-company-writepanels.php plugins > mas-wp-job-manager-company > includes > mas-wpjmc-template-functions.php Thanks, Abbas
Thank you Abbas! But such changes would be overwritten with future updates. So is it currently not possible to add your own fields? Best regards, David
Hi @davidspeyer , Yes, if you override the plugin files it will override when you update plugins. Thanks, Abbas