Forum Replies Created

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter abilderback1978

    (@abilderback1978)

    Yes, I absolutely learned my lesson on that one. Thanks, again!

    Thread Starter abilderback1978

    (@abilderback1978)

    Hi, again, Press Tigers;

    You can disregard my request. I do believe I have been able to figure it out. I changed my If statement to the below, and it seems to be working fine, now.

    if (0 === document.getElementById("applicant_resume").files.length){
    	            jobpost_submit_button.attr('disabled', false);
    }
    else if ($.inArray(file_ext, selected_file_exts) > -1) {
                    jobpost_submit_button.attr('disabled', false);
    }
    else {
                    /* Translation Ready String Through Script Locaization */
                    alert(application_form.jquery_alerts['invalid_extension']);
                    applicant_resume.val('');
                    return false;
    }

    Many thanks, as always!!
    Amanda

    Thread Starter abilderback1978

    (@abilderback1978)

    Hi, Press Tigers!

    I recently updated the Simple Job Board plugin, and it seems that the JS functionality has changed, and as such, the above solution for allowing the resume field to be optional, is no longer working. I have added the above provided code to the class-simple-job-board-ajax.php file, as instructed before, but when I attempt to change validation in the javascript, I’m missing something, as the form still gives me the “not a valid file extension” error when attempting to submit without an attachment. This is how I’ve structured my if statement:

    if ($.inArray(file_ext, selected_file_exts) === 0){
    	            jobpost_submit_button.attr('disabled', false);
                }
    
                else if ($.inArray(file_ext, selected_file_exts) > -1) {
                    jobpost_submit_button.attr('disabled', false);
                }
                else {
                    /* Translation Ready String Through Script Locaization */
                    alert(application_form.jquery_alerts['invalid_extension']);
                    applicant_resume.val('');
                    return false;
                }

    My site: mobettahs.com/jobs/salt-lake-city/

    Thank you!!
    Amanda

    Thread Starter abilderback1978

    (@abilderback1978)

    This appears to be working beautifully!! Thank you so much for a great plugin; and awesome support as well.

    Thread Starter abilderback1978

    (@abilderback1978)

    I’m not sure I understand what you mean; I don’t want to remove the Attach Resume option completely, I just want to make it optional. I want the code to ignore it if the field is blank, but if the field has a file uploaded, I want the checks to ensure that the file extension is permitted, and save the file. I’m not sure what to remove from class-simple-job-board-ajax.php to keep the functionality intact in the event that a user does attach a resume. And ultimately, how to make the message update when a user submits an application successfully.

    Can you give me another clue for which lines of code I need to look at? Thank you!!

    Thread Starter abilderback1978

    (@abilderback1978)

    Sorry, one more note. I commented out the earlier If statement that requires the user to submit an attachment. Like this:

    //if (0 === document.getElementById("applicant_resume").files.length) {
                //    document.getElementById('file_error_message').innerHTML = 'Please Attach Resume';
                //    return false;
                //}

    Thread Starter abilderback1978

    (@abilderback1978)

    This is how I structured the If statement; granted, I’m not altogether sure what I’m doing, but this DID result in a successful submission; however, the message froze at “Submitting” and never updated to “‘Your application has been received. We will get back to you soon.’

    if (0 === document.getElementById("applicant_resume").files.length){
                    jobpost_submit_button.attr('disabled', false);
                }
                else if ($.inArray(file_ext, selected_file_exts) > -1) {
    	            jobpost_submit_button.attr('disabled', false);
                }
    
                else {
                    alert('This is not an allowed file type.');
                    applicant_resume.val('');
                    return false;
                }
Viewing 7 replies - 1 through 7 (of 7 total)