• Resolved ashuga

    (@ashuga)


    Hello team,

    Recently our job submission form stopped moving on to the preview step, because it says that the “job type” field is required. However, it is filled out with one of the options when we test this.

    Testing it out, it seems that this only happens of the “job category” field is not filled out. If job category is filled out, it works as expected.

    Is this the expected behavior? We started using the categories option recently, does that mean their use is required? I’m not sure it makes sense though, since the validation points to the “job type” field as not being filled out.

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Contributor Cena (a11n)

    (@cena)

    Hi @ashuga ,

    Could you post a link to a screenshot or screenshot showing this behavior, and the error you’re getting?

    If I’m understanding you correctly, I also get the same result on my test site (with categories enabled, if I leave the category field blank, I will get an error.)

    Best,
    Cena

    Thread Starter ashuga

    (@ashuga)

    Hi Cena,

    Here’s a screenshot: https://imgur.com/a/3su24Eo

    In my screenshot you can see that a job type is filled out, but category is NOT filled out, but when you submit the form it shows an error for job type.

    Thanks.

    Plugin Contributor Cena (a11n)

    (@cena)

    Hi @ashuga ,

    Thanks!

    This only appears to happen for themes with a fixed header. When an element is marked as required, the browser scrolls up to the first required field that is empty and shows the tooltip over it. However, in the case of fixed positioning, the end result is that the required field is hidden beneath the header.

    Does the issue persist if you switch to a theme like TwentyTwenty?

    Best,

    Thread Starter ashuga

    (@ashuga)

    Our theme does not use a fixed header, and in the screenshot I shared you can see that the field isn’t really hidden under anything. It’s just pointing to the “Job Type” field as needing to be filled out when it already it is.

    I might be misunderstanding though. When you say “fixed header”, do you mean something aside from a header section of the theme being fixed to the top of the viewport?

    Aside from it pointing to the wrong field, another weird thing is that it works if you choose a job category. I’m looking closer now at the source code and I do see that there is a <div class=”field required-field”> around job_category, implying that it’s always required? I can’t find an option to not make it required if so.

    Thread Starter ashuga

    (@ashuga)

    Any updates since my reply above?

    ETA:

    I just tried a couple of things to troubleshoot:

    – Switching the theme to 2020 does not make a difference in the behavior. If a job category is not selected, the browser still takes you to “job type” as if it needs to be filled out, when it is. It should be pointing to “job category” which is apparently required no matter what? I cannot find a setting to turn off requiring job category.

    – Also I figured out this issue only happens if you have set up “job type” to be multi-select by checking the “multi-select listing types” in the settings.

    – Weirdly enough, I do not have “default to category multiselect” checked, but job categories still displays as multi-select.

    Hopefully with the info above someone can replicate this issue and help me out here.

    • This reply was modified 4 years, 7 months ago by ashuga.
    Thread Starter ashuga

    (@ashuga)

    Hi @cena any updates on this?

    Plugin Contributor Cena (a11n)

    (@cena)

    Hi @ashuga ,

    I’m sorry, I totally misunderstood your initial question!

    Well, the good(?) news is that I can duplicate the issue, at least partially.

    By partially, I mean that it happens for me regardless of this bit:

    > this issue only happens if you have set up “job type” to be multi-select by checking the “multi-select listing types” in the settings.

    (I did not have either job type or categories set to multiselect.)

    Both type and category are ‘required’ by default. What would you like to see here – the option to turn off the required bit, better messaging, or something else?

    > Weirdly enough, I do not have “default to category multiselect” checked, but job categories still displays as multi-select.

    This was a bug that was fixed in 2019: https://github.com/Automattic/WP-Job-Manager/issues/1517 but I can confirm this is happening as well, so I’ve reopened that issue.

    Best,
    Cena

    Thread Starter ashuga

    (@ashuga)

    @cena,

    Ultimately, the issue is that the form points to a required form field that is already filled out when it should be pointing to the empty required form field below it. Like in the screenshot I shared here: https://imgur.com/a/3su24Eo

    I was able to replicate this in the 2020 theme. Note that the theme doesn’t show a popup for what hasn’t been filled out, but instead focuses on the field. So it’s subtle, but in this screenshot the “Job Type” field is focused because it apparently isn’t filled out (it is): https://imgur.com/a/atuVTqc

    That’s the confusing part for user experience. I can sort of make it go away by setting up job type to not be multi-select, but ideally it should work either way, right?

    Thread Starter ashuga

    (@ashuga)

    @cena or anyone

    For clarity, these are the steps to make this issue happen:

    1. Have both “Job Type” and “Job Categories” set up as multi-select.
    2. Fill out every required field, EXCEPT “Job Categories”
    3. Try to submit the form. Validation will focus you on “Job Types” even though it is filled out.
    4. Fill out “Job Categories”. Now you can submit the form, but it’s confusing since the validation did not point to “Job Categories”.

    I’m also now noticing that some fields will do server side validation instead of client side? If you fill out everything but “Job Types” and submit, it lets you know that it needs to be filled out with a message at the top of the form, instead of focusing on the field. I wonder if this is related to my initial issue somehow.

    Plugin Support bindlegirl (a11n)

    (@bindlegirl)

    Hi @ashuga !

    We have dropped the ball on this topic and failed to reply here for a while. I’m sorry about that. Do you still need help here?

    I tried reproducing the error as you described it and it all worked as expected for me with the correct field (categories) marked as missing.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Job type filled, but form does not send’ is closed to new replies.