How to validate an entry

  • Profile Image
    rallred21
    Asked on March 23, 2012 at 11:48 PM

    Hello,

     

    I'm trying to implement a promotion code with my form.  I have already created a condition so that the promo code "must equal" a specific code. 

     

    However, I would like to add a comment next to the text box if the customer inputs the incorrect promo code.  I want to warn them that they did not input a valid code.  Can you please help me with a solution?

     

    Thank you!

     

  • Profile Image
    gori-mathew
    Answered on March 24, 2012 at 12:56 AM

    Hello;

    You can start by setting up the condition and then adding rules.You can then setup a show/hide condition of to hide the button if the password is incorrect  and then add similar rules within the condition for the password.

    Show/Hide; https://cms.jotform.com/uploads/image_upload/image_upload/global/2252_conditionsWizard_showHideAformField.png

    You can find more guideines on this user guide link; https://www.jotform.com/help/57-Conditional-Logic-on-Forms

    Hope this information helps, kindly feel free to get back to us on progress.

  • Profile Image
    abajan
    Answered on March 24, 2012 at 09:54 PM

    Hi Rand

    Please have a look at this altered clone of your form which implements the solution referred to by my colleague. Enter the following promotion code: abc123

    If this is the sort of functionality you want, feel free to clone the form and while on the Setup & Embed tab, click Conditions > Saved Conditions and then click the condition to see how it has been setup.

    Achieving the specific funtionality you requested is possible but would require acquiring the forms full source from the Embed Form Wizard, adding JavaScript and then embedding the code into a web page of your choice.

    Looking forward to hearing your thoughts.