View Full Version : Make a textbox required

07-10-2005, 10:29 PM

I have a basic MSI project. How do I make an edit field mandatory? I would like the user to enter a Name and Company Name in the company information screen. If either field is blank then the next button will not be enabled. One of the installscript samples has this function but I cannot figure out how to do this.

Thanks, Robin

07-11-2005, 11:10 AM

I have been able to figure this partially. I found other posts descibing how to set a condition on the Next button.

Disable - COMPANYNAME=""
Enable - COMPANYNAME <> ""

However this only enables the Next button when the user leaves the CompanyEdit field. I really need to change the Next button when the user types anything in the field. In this dialog the user does not need to leave the company field before clicking the Next button so it it not intuitive.

Thanks, Robin

07-11-2005, 11:18 AM
Alas, this is a limitation of the Windows Installer (Basic MSI) UI: see Macrovision KB article Q108570, "Limitations of the Basic MSI User Interface", at http://support.installshield.com.

Common practice instead is to attach an action to the Next button that detects whether the edit field is empty, and display an error message if so.

12-12-2005, 06:20 PM
Can you please give an example on how to create this custom action.