Conditionally Show Checkbox if there is validation triggered

Certified Senior Developer

Hi,

I need to show a check box in UI on click of Submit button, if there is a validation triggered on Submit.

The check box should not be visible otherwise.

If there is no validation getting triggered in UI then the form should just submit.

How can we achieve this.

Thanks in advance.

  Discussion posts and replies are publicly visible

Parents Reply Children
  • 0
    Certified Lead Developer
    in reply to best

    I believe there's no way to do this exactly as you've stated - you would need to either use Stefan's approach of a 2-click process to first run a pre-validation then either submit or show the checkbox and submit, OR use Stewart's approach of running live validation in the background as the form is filled and showing the checkbox BEFORE the user attempts to submit, when applicable.  Honestly this (latter) solution is far more user friendly, as you're not surprising them with some "gotcha" extra requirement when they thought they were ready to submit.

    Also: remember that requirements don't and can't dictate design.  They're two separate things.  Many product owners have no concept of this of course, but that doesn't change the reality of it.