This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Edit Control Validation
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 18, 2011
08:55 AM
Edit Control Validation
Hello
I want to add validation to dialog box so that when user clicks 'Next' button it prevents them continuing if 'Edit1' (a control on the form) is blank.
I have added two actions to the Next button behaviour:
1. Run custom action (Installscript) to display a message box on condition Edit1 = ""
2. NewDialog if Edit1 <> ""
Action 1 works fine, but action 2 never seems to execute even when Edit1 is not blank, so usercannot move on to the next dialog box.
Any suggestions please?
I want to add validation to dialog box so that when user clicks 'Next' button it prevents them continuing if 'Edit1' (a control on the form) is blank.
I have added two actions to the Next button behaviour:
1. Run custom action (Installscript) to display a message box on condition Edit1 = ""
2. NewDialog if Edit1 <> ""
Action 1 works fine, but action 2 never seems to execute even when Edit1 is not blank, so usercannot move on to the next dialog box.
Any suggestions please?
(3) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 28, 2011
06:47 PM
It will probably easier if you post screenshots of Edit control property sheet and Control Events on Next button. Also, a verbose installation log may shed some light on this problem.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 30, 2011
11:10 AM
Assuming that you already have your custom dialog setup the way you want and have the InstallScript code with a switch statement to respond to different events, here's how I would write the code for NEXT button's switch case.
// case statement for NEXT button click in your dialog
case RES_PBUT_NEXT:
// Get the contents of the edit boxes.
// RES_EDITBOX is the control identifier for your Edit box,
// svEditText is a string to retrieve the input
CtrlGetText (szDialogName, RES_EDITBOX, svEditText);
// Verify that edit box has data.
if (StrLength(svEditText) = 0)) then
MessageBox ("Text field cannot be empty.", INFORMATION);
else
bDone = TRUE;
endif;
nResult = NEXT;
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 06, 2012
03:28 AM
Thanks for your responses, all works fine now 🙂