How do I edit the error message on a Multi-Step Form?

Hi all!

I have a multi-step form on my website. And on the first step, I simply have a checkbox for Passport Confirmation.

How do I edit the error message, so that when the “Continue to Submission” button is pressed but the checkbox is left unchecked, it displays a message that says “You must have a valid passport to submit”?

Any help would be much appreciated?

Thanks!

Warmly,
Miss Hazel

LINK: www.theregularsmusical .co. uk/auditions

There’s not enough info here.
Have you created your own form? A sort of a Wix form app (which?)?
Do you have any code on you page (post it, please)?

I created my own multi-step form from the options native to Wix. And I have not added any code yet because the code that I tried targeted the option itself and not the options response to the step-advance button being triggered.

I included the link above. Please feel free to ask more questions!!

@misshazeljade

As J.D. already tried to explain you, perhaps you should show the code, which you have already tried to generate, so everybody can try to understand what exactly you are trieying to achieve.

Although i do not really work with predefined wix-forms (because i generate all my elements in custom-mode), i assume that you will need to take a look onto the “Check-Box-Element” and its coding possibilities…
https://www.wix.com/velo/reference/$w/checkbox

…and also take a look here for Wix-Forms commands…
https://www.wix.com/velo/reference/wix-crm/$w-wixforms

Which commands could be interessting for you?

  1. https://www.wix.com/velo/reference/$w/checkbox/checked
  2. https://www.wix.com/velo/reference/$w/checkbox/required
  3. https://www.wix.com/velo/reference/$w/checkbox/valid
  4. https://www.wix.com/velo/reference/$w/checkbox/validationmessage
  5. https://www.wix.com/velo/reference/$w/checkbox/validity
  6. https://www.wix.com/velo/reference/$w/checkbox/onchange

Your starting code-sequence could look like…

$w.onRready(()=>{
   $w('#myCheckBoxIDhere').onChange(()=>{
      //put in here what shall happen, when the CHECKBOX check-state was changed.
   });
});

@russian-dima “Ninja”, as I clearly said sweetheart, there is NO CODE there right now, my love.

However, J.D., I did just try this code to no avail because it’s just one step in the process of what I’m trying to achieve (as described above).

$w("#multiStepForm1").onCustomValidation( (value, reject) => {
 if(value === "evil")
 { reject("You must have a valid passport to submit."); 
 } 
 });

@misshazeljade Hi, customization of the form apps are quite limited. Maybe you can do with some apps. I can’t tell as I never use them (due to the lack of flexibility) and I always build my own forms using input elements (and text element for messages and alerts).

I suggest you do the same and install the @velo/wix-bulk-validation package to detect which field is not valid, use the custom validation as you did, and if it’s the passport field, $w("#passportMsg).expand() else $w("#passportMsg).collapse()

@jonatandor35 Thank you! I appreciate you so much!!!