• Resolved thewebtailors

    (@thewebtailors)


    I just ran into the following issue with nested conditions. Field C only shows if the radio of field B has a specific value. Field B only shows if the radio of field A has a specific value. Field C is required.

    When submitting the form and the condition for field B is not met (= field C is also not displayed because of it), the form (PHP validation) says that not all required fields have been filled out. When looking at the HTML code I see that the problem is field C.

    I was able to get around it by adding another conditional statement to field C that now checks both if field A and B have the required value. However, this did not used to be the case and this behavior change must have been introduced with some of the most recent releases.

    If your developers could check into it and possible get this fixed that would be great.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support Nebu John – WPMU DEV Support

    (@wpmudevsupport14)

    Hi @thewebtailors,

    Sorry to know that you are experiencing this issue.

    Wouldn’t you mind please share an export of the form so we can take a closer look at the issue? Please use services like pastebin.com or Google Drive to share the export.

    Please find how to export a form in our documentation here: https://wpmudev.com/docs/wpmu-dev-plugins/forminator/#import-export

    We look forward to hearing back from you.

    Kind Regards,
    Nebu John

    Thread Starter thewebtailors

    (@thewebtailors)

    Sure, here is a simplified version of the form: https://pastebin.com/zKbHNv9i
    To see the error, select Option B for Field A when submitting.

    This setup used to work until recently. Now, it would require me to set a 2nd condition for Field C that checks if Field A has Option A selected.

    After looking into it a little bit more, it only happens if the “is not” condition is used.

    Plugin Support Kris – WPMU DEV Support

    (@wpmudevsupport13)

    Hi @thewebtailors

    The shared form in the previous reply does not match your first description.
    If I understand this correctly you are looking for this:
    https://pastebin.com/4KpdUtLX
    where Field C Visibility is changed from:
    Is NOT | option 2
    to
    Is | option 1
    which fix the issue.

    Kind Regards,
    Kris

    Thread Starter thewebtailors

    (@thewebtailors)

    Thank you for your reply! Yes, this workaround fixes the issue in my example. But in the actual form, Field B has many options. Because of this, the “is not” condition makes more sense. Here is another sample with more options: https://pastebin.com/bz54MsxM

    Try submitting the form by just selecting Option B in Field A. It will show an error that the form is not valid.

    Since I altered the form I had problems with, the issue is resolved for me. However, I wanted to bring this to your attention since it used to work and then it stopped. The only changes to the form were Forminator software updates. There we no configuration updates.

    Plugin Support Adam – WPMU DEV Support

    (@wpmudev-support8)

    HI @thewebtailors

    Thanks for sharing that example!

    I checked it and I can see what do you mean. I agree that “is not” is a better choice “logically” here.

    We already have some important improvements for conditional visibility logic (and field validation) planned, though, so I believe we should get this improved in future as well.

    Thank you for pointing out attention at this issue!

    Kind regards,
    Adam

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Required Conditional Field Bug’ is closed to new replies.