cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Joseph_Schrag
Level 6

How do I disable a "next" button until input is valid & reenable as the user types?

I've got a SQL Login dialog in my Basic MSI project on which I want the next button disabled until all text boxes are filled in. I've been able to accomplish this by adding [PROP] <> "" conditions to the next buttons enable properties. However, the properties do not get updated until the text box loses focus. For example, if the user completes the textboxes, ending with the catalog text box, the next button is not immediately enabled as he/she types. The user actually has to click another control (text box) before the next button becomes enabled. Is there a way to update the property as he/she types?

Note: I've tried adding [PROP] [PROP] 1 events to the textboxes and the behavior remains the same.
Labels (1)
0 Kudos
(6) Replies
Joseph_Schrag
Level 6

Any thoughts?
0 Kudos
Alpesh
Flexera Alumni

Hi Joseph,

This is a limitation of Windows Installer. I do not believe there is a way to workaround this.

Thanks,
Alpesh
0 Kudos
Joseph_Schrag
Level 6

Ok, is there any way to capture the user's click of the disabled next button simply for the purpose of allowing the text box to fill it's property (and therefore enable the next button.
0 Kudos
Joseph_Schrag
Level 6

Or is there perhaps a way to put a timer on the dialog to refresh the text boxes every second or so?
0 Kudos
Christopher_Pai
Level 16

No, there is not. Limitation of MSI. The closest you can get is to leave the next button enabled and do your validation as part of a ControlEvent on the next button. You can either pop up a modal dialog using SpawnDialog or transition to a go-nowhere dialog using NewDialog with a back button to return the user to correcting the input.
0 Kudos
Joseph_Schrag
Level 6

Thanks for the reply Christopher!

I was starting to head in a similar direction. I wrote a installscript to check the value of the variables tied to the text boxes and popup a message box if they were invalid. This was fired by a DoAction event on the next button. My problem is that the message box does not stop the button from loading the next dialog.

I'll look into the ControlEvent approach you mentioned to get rid of that problem.
0 Kudos