Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor Dan (a11n)

    (@drawmyface)

    There isn’t a simple way to do that via PHP. Your best bet may be a small js script that would add the disabled attribute to the field when a user tries to edit a job.

    Sorry, but we aren’t able to help with custom code requests like this. You may want to look into one of these services:

    https://jobs.wordpress.net/

    https://studio.envato.com/

    https://codeable.io/

    Thanks!

    Thread Starter phm2000

    (@phm2000)

    Hi

    I add this script in class-wp-job-manager-form-edit-job.php
    It’s ok, but it’s not possible to override this file.
    How can I do ?

    Thanks

    <script>
    function disabled_job_title() {
    	document.getElementById("job_title").disabled = true;
    	document.getElementById("job_location").disabled = true;
    }
    </script>
    
    <body onload='disabled_job_title()'>
    Thread Starter phm2000

    (@phm2000)

    Hi

    With disabled, it doesn’t match when save the job listing, wp job manager needs a job title.
    So I replace disabled by readOnly and it’s ok.

    The good script is :

    <script>
    function disabled_job_title() {
    	document.getElementById("job_title").readOnly  = true;
    	document.getElementById("job_location").readOnly = true;
    }
    </script>
    
    <body onload='disabled_job_title()'>

    I didn’t success in override class-wp-job-manager-form-edit-job.php

    Plugin Contributor Dan (a11n)

    (@drawmyface)

    Sorry, but we aren’t able to help with custom code requests like this. You may want to look into one of these services:

    https://jobs.wordpress.net/

    https://studio.envato.com/

    https://codeable.io/

    Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Disable job title editing when job edit’ is closed to new replies.