vigyanlabsmys
Posts: 73
Joined: Sat May 17, 2014 12:37 pm

clear edit boxes

Hi,

I want to clear the edit boxes and uncheck the check boxes when a radio button is clicked. how do i go about this?
Best Regards,
Dan
Catalin
Posts: 7845
Joined: Wed Jun 13, 2018 7:49 am

Re: clear edit boxes

Hello Dan,

This can be achieved. However, this can be achieved only when the user presses the "Next" button.

As you may know, every control from the dialogs has a property assigned to it that stores its value.

For instance, the edit box property will store whatever is typed inside it and the property of a checkbox will store (by default - this can be customized):

- "CheckBox" if the checkbox is checked
- "" (empty string) if the checkbox is not checked

In order to achieve what you want, we will need to set the properties of the edit box and the checkbox according to what the value of the radio button group (a radio button group is a control which contains 2 or more radio buttons) value is. By default, when you add a radio button group to one of your dialogs, it will look like this:
RadioButtonGroup.png
RadioButtonGroup.png (157.2 KiB) Viewed 9188 times
By default, you can notice that the property is called: RADIOBUTTONGROUP_1_PROP

Additionally, its default value is "RadioButton_1", because the first radio button is selected. If the second radio button will be selected, its value will be changed to "RadioButton_2".

Now that we have clarified that, in order to achieve what you want, you can proceed as it follows:

- go to "Dialogs" page

- select the dialog that contains the radio button group, the checkbox and the edit box controls.

- click on the "Next" button

- under "Published Events", create as many events as you need, as it follows:
EmptyEditbox.png
EmptyEditbox.png (157.85 KiB) Viewed 9188 times
The condition can look like this:

Code: Select all

RADIOBUTTONGROUP_1_PROP = "RadioButton_2"
if the second radio button is checked, then empty the property that stores the value of the edit box (makes the edit box empty)

In the exact same way (as described in the screenshot), you can uncheck the checkbox control.

Additionally, you can see all the properties of a control by clicking on it and then looking on the right pane, under "Properties" section. There, you can see the property assigned to a control , its default value, etc.

Hope this helps.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
vigyanlabsmys
Posts: 73
Joined: Sat May 17, 2014 12:37 pm

Re: clear edit boxes

Hi catalin,

Can i do this using any push button or only using the Next button?
Best Regards,
Dan
Catalin
Posts: 7845
Joined: Wed Jun 13, 2018 7:49 am

Re: clear edit boxes

Hello Dan,

Yes, of course you can.

To do so, simply add the "Push Button" to your dialog, click on it and add the event under the "Published Events" tab.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
vigyanlabsmys
Posts: 73
Joined: Sat May 17, 2014 12:37 pm

Re: clear edit boxes

Hi Catalin,

It worked. Thank you.
Best Regards,
Dan
Catalin
Posts: 7845
Joined: Wed Jun 13, 2018 7:49 am

Re: clear edit boxes

You are always welcome, Dan.

Glad I could help.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”