briancorcoran
Posts: 19
Joined: Thu Mar 16, 2017 4:21 pm

Validating two edit boxes

I have two edit boxes where I am asking a user to enter a password. If the contents of the boxes do not match, I do not want Next to go to the next dialog. I want to put up an error message. I don't think I want an inline script, because the message would be difficult to translate. How do I compare the box contents, and how do I put up the error message?

Thanks,

Brian Corcoran
Catalin
Posts: 7504
Joined: Wed Jun 13, 2018 7:49 am

Re: Validating two edit boxes

Hello Brian,
I have two edit boxes where I am asking a user to enter a password. If the contents of the boxes do not match
From this, my understanding is that you have two boxes where the user has to input a password and the re-enter it. If this is the case, then this should be pretty simple.

This can be achieve by following the next step-by-step:

1. Add the two edit-boxes to your dialog.

2. click on the "Next" button --> on the right side, under "Attributes" section, set the "Enabled" attribute to false.

3. each edit box has a property assigned to it. For instance, two default edit boxes will have the following properties:

EDIT_1_PROP

EDIT_2_PROP


We can use these properties in a "Control Condition" in order to further enable our "Next" button.

4. click on the "Next" button --> under "Control Conditions" tab click "New..." to create a control condition as it follows:

Condition: EDIT_1_PROP = EDIT_2_PROP
Action: Enable


In what regards the error message, I am not sure this is necessary since our button is not available until the user inputs the same string in both of our edit boxes.

Hope this helps.

All the best,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”