Enable/Disable Widgets on selecting radio button options
Question

Actually I’m stuck in creating a screen I don’t know what logic has to be used !

My screen consists of 

A). Radio buttons with two options  they are 1) create new data 2)use existing data
B). One input widget of type text
C).  Two checkboxes

when I select first option of radio button(Create new data). The input widget should be disabled ie I can’t type anything in it  and both checkbox should be enabled 


when I click on second option of Radio button(use existing Data)

The input widget should be enabled I can type anything in it and both the checkboxes should be disabled in such a way that both of them should be selected by default and user can’t deselect them !

Please provide oml 

Solution

Please check the OML provided.

You need to create a variable for the radio group that will hold the value selected on the radio buttons.




After that you just need to use that variable on the property enabled of the widgets, depending on the value of the radio button selected, it's going to be enabled or not.



Kind Regards,

Márcio

radiobuttons.oml

Hi Omkar,

As you already explained, you need to Enable/Disable widgets as per radio button selection. There is a Enabled property for all UI widgets. You can control with the Enabled property by passing the radio button variables to control the Enable/Disable property as per your use case.

Thanks.

Solution

Please check the OML provided.

You need to create a variable for the radio group that will hold the value selected on the radio buttons.




After that you just need to use that variable on the property enabled of the widgets, depending on the value of the radio button selected, it's going to be enabled or not.



Kind Regards,

Márcio

radiobuttons.oml

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.