We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

apajovejohn
Posts: 19
Joined: Tue Dec 18, 2018 6:11 pm

Disable Next Button until ListBox entry is SELECTED

Hi,
I'm trying to ensure that the user can't click Next until an entry is clicked in a dynamically created ListBox. The ListBox is populated by a PowerShell script custom action (to list certificates for the user to pick for binding to the IIS websites we're creating). This all works great, but there's a "bug" that I can't work past where the user can elect to not click an entry in the displayed list and then the installer fails.

Is there a way that I can disable the Next button until the user clicks a certificate? I've tried setting AI_LISTBOX = "" disable and AI_LISTBOX_DATA <> "" Enable but I think the ListBox always has data once it's been populated, so this doesn't appear to work.
Liviu
Posts: 1420
Joined: Tue Jul 13, 2021 11:29 am
Contact: Website

Re: Disable Next Button until ListBox entry is SELECTED

Hello,

I just tested this with a sample project and everything worked as expected.
listbox control.png
listbox control.png (34.65 KiB) Viewed 4581 times

The ListBox control is populated with the available drives on the computer, through a PowerShell script.

On the Control Conditions of the Next button you need to pass the property name of the ListBox control:
control conditions.png
control conditions.png (15.83 KiB) Viewed 4581 times
listbox property.png
listbox property.png (59.67 KiB) Viewed 4581 times

Please find attached the sample project.

I hope this is helpful!

Best regards,
Liviu
________________________________________
Liviu Sandu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
apajovejohn
Posts: 19
Joined: Tue Dec 18, 2018 6:11 pm

Re: Disable Next Button until ListBox entry is SELECTED

Liviu, I'm really grateful for your support.

I got it working as you describe, it was not working previously as I had fundamentally misunderstood how to use the AI_LISTBOX_DATA property and was using that as my actual LISTBOX property, it worked, but having a MY_LISTBOX_PROP which I can then check the data of after pushing info into it from AI_LISTBOX_DATA custom action was the missing piece.

Thanks again

john
Liviu
Posts: 1420
Joined: Tue Jul 13, 2021 11:29 am
Contact: Website

Re: Disable Next Button until ListBox entry is SELECTED

You're always welcome, John!

It's great to hear that everything is now working as expected.

Best regards,
Liviu
________________________________________
Liviu Sandu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”