Checking if the (referral) code in textbox is OK or should not be accepted

  • asadhwani
    Asked on February 12, 2015 at 6:29 AM

    Hello,

     

    I would like to add a referral code field to my form.  Basically a text box that validates a code.  For example, I want to give a sales person a code that they share with their customers.  The sales person customer (user) uses that code when they complete a submission.  I want the system to validate the code and accept the code or tell the user that the code is invalid.  Is that possible?  The purpose is this will help me track how many orders came in as a result of this particular sales person.

    Ajay

  • Ben
    Replied on February 12, 2015 at 9:50 AM

    That would be possible by matching the code through the conditions Ajay.

    Now this would mean that you would need to add all codes in the conditions and then have them check if by some chance the code does not match any of them and if so, to show the warning.

    In this case I would suggest one condition that is matching with AND rule and "Is not equal to" rule value option.

    This would then check any number of the codes and if neither of them are equal to the one added in the text box, the error would be shown.

    Useful thread: How to Find The OR operator in conditions?

    Useful guides:

    Smart Forms Using Conditional Logic

    Hide or Show Multiple Fields at Once