Support » Plugin: WP Job Manager » Job submit form label couldn’t replace

  • Resolved Jerry101

    (@jerry101)


    Hi

    i tried to add this function to change my job submit form label

    // Add your own function to filter the fields
    add_filter( ‘submit_job_form_fields’, ‘custom_submit_job_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_job_form_fields( $fields ) {

    // Here we target one of the job fields (job_title) and change it’s label
    $fields[‘company’][‘company_name’][‘label’] = “Personal name”;

    // And return the modified fields
    return $fields;
    }

    But is not working , can anyone let me know what is going wrong here ?

Viewing 4 replies - 1 through 4 (of 4 total)
  • sorry for the wrong posting

    check this

    // Add your own function to filter the fields
    add_filter( ‘submit_job_form_fields’, ‘custom_submit_job_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:http://www.connetbiz.com/public_html/wp-content/plugins/wp-job-manager/includes/forms/class-wp-job-manager-form-submit-job.php
    function custom_submit_job_form_fields( $fields ) {

    // Here we target one of the job fields (job_title) and change it’s label
    $fields[‘company’][‘company_name’][‘label’] = “Personal name”;

    // And return the modified fields
    return $fields;
    }

    Plugin Author jonryan

    (@jonryan)

    @jerry101 are you adding this to your functions.php file? This appears correct.

    Hi

    Yes , i tried to add this to my function.php , but is not working. what do i miss ?

    Regards
    Jerry Tan

    Plugin Author jonryan

    (@jonryan)

    Are you getting a 500 error when you are adding this? At least the code you posted here has improperly formatted quotes. If you fix them it works.

    add_filter( 'submit_job_form_fields', 'custom_submit_job_form_fields' );
    
    function custom_submit_job_form_fields( $fields ) {
    
    	$fields['company']['company_name']['label'] = "Personal name";
    	return $fields;
    }
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Job submit form label couldn’t replace’ is closed to new replies.