ps2
Posts: 16
Joined: Fri May 02, 2008 9:54 pm

Dialog Validation

Hi,

I've looked through the forum and FAQ's but can't seem to find an answer to this question. Hopefully it's just a matter of pointing me in the right direction.

I have a configuration dialog that prompts for a default password. Originally I had just the one field but started finding that people would occassionally mistype the password leaving it difficult to get into the application for the first time. I have now added a second password field called "verify password" in the hopes that they won't mistype it twice. What I would now like to do is force the user to type the same password twice before continuing with the installation. While I found that modifying the published event for the next button allows me to achieve this, it doesn't provide any type of error message as to why the next button does not work (possibly leaving the user to think it is broken).

So, what I'm basically looking for, is a way to compare the value of two dialog input values and present a message if they do not match.

Thanks,

ps.
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Dialog Validation

Hi,

You can show a message to the user by using a ScriptInline custom action scheduled under the "UI Custom Actions" sequence. For this custom action you can set the "Script Text" field to something like:

Code: Select all

MsgBox "The verification of your password failed, please re-enter it"
After the custom action is created, you can add it as a "DoAction" Published control event for the "Next" button which verifies the password. The condition of this control event should be the opposite of the condition for the "NewDialog" control event. Basically, if the user cannot go to the next dialog, the package will show the custom message.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
maffeis
Posts: 2
Joined: Wed Dec 14, 2011 2:14 pm

Re: Dialog Validation

Hi.

I tried this solution, the messagebox popup op, but after pressing the "OK" button on the popup,
then installer moves to the next page, instead of remaining on the page having the wrong
password. How can I avoid this?

Silvano
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Dialog Validation

Hi Silvano,

Can you please send us the .AIP ( project file ) to support at advancedinstaller dot com so we can investigate it?

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”