View Full Version : Required entry question

06-04-2004, 08:31 AM
I have an edit box that is required to be filled out before you can move on to the next screen. I added enable and diable conditions to the Next button which basically say Enable if Edit <> "" and Disable if Edit = "". Unfortunately the Next button is greyed out until I hit the Tab button or go back to the previous screen and then Next to the current one.

Is there a better way to do this?


06-04-2004, 08:38 AM
Alas, this is a limitation of the Windows Installer user interface functionality, that edit-field-changed messages are apparently thrown away.

Please see InstallShield Knowledge Base article Q108570, "Limitations of the Basic MSI User Interface", at http://support.installshield.com/kb.

Nate Bloyd
06-04-2004, 11:20 AM
A way around this that we have used (though it is considered sloppy) is to use your code, but instead of using it to enable/disable buttons, use it to prompt the user if the entry is incomplete/invalid. Hope this helps.

06-04-2004, 11:59 AM
I was thinking of doing that, but was unsure as to how to get the message to pop up to the user.

The help documentation is not really helpful for a newbie.

Nate Bloyd
06-04-2004, 01:08 PM
This is part of the InstallScript code we use:

MsiGetProperty(hMSI, "PUBLICPROPERTY", svResult, nvValueBuf);
nvLength = StrLength(svResult);
if (nvLength = 0) then
MessageBox ("(Data) entered is invalid.", SEVERE);

This code is used as a conditional statement of the Next or Back buttons behavior. You can add functions like these as "Do Actions" in the Dialogs view.

07-20-2004, 03:04 PM

If this custom action is being called on the click of the NEXT button and if nvLength = 0, how do you send them back to the same dialog to force them to enter a value for that property?

I am trying to write a VBScript custom action for this and am kinda lost now. I am sure I am missing something stupid here! :o


Nate Bloyd
07-20-2004, 04:07 PM
If you place the DoAction Event that sets the Boolean "PUBLICPROPERTY2" property high in the order, and then use "PUBLICPROPERTY2" as a condition in a later event, it will not let you past the current dialog.

07-21-2004, 04:17 PM
Thanks man!

I am going to try this and share my experience here...