Hi,

I have 2 check boxes with "Agree" and "disagree" option ,

and I want users to select only one of the check boxes , and if :Disagree is selected should appear a warning message to give reasons , 

please suggest me how do I achieve this,


Hi Primal Lobo,

First of all, two radio buttons seem to be a better math for that particular scenario (your users are not going to agree and disagree at the same time - or are they?)

Whether you use Check Boxes or Radio Buttons, the general solution is going to be similar: you can use the OnChange event of the widget to run a screen action that would check if the Disagree option was selected and if that was the case show a Modal that would ask for the reason.

Hope this helps 

Jorge Martins wrote:

Hi Primal Lobo,

First of all, two radio buttons seem to be a better math for that particular scenario (your users are not going to agree and disagree at the same time - or are they?)

Whether you use Check Boxes or Radio Buttons, the general solution is going to be similar: you can use the OnChange event of the widget to run a screen action that would check if the Disagree option was selected and if that was the case show a Modal that would ask for the reason.

Hope this helps 

Hi Jorge Martins,

Thanks for the response,

I am using OS 10, instead of Modal what can be used and if I add only one check box for Agree and if it is not selected the message should be displayed , can u please suggest how to do this in onchange!

Thanks in advance


Hi Primal,

If you can not use modal then you can add the warning message in container. And add that container in an if condtion and give the condtion when the checkbox is selected as disagree then only the container will display otherwise not.


Thanks,

Sushmita

Sushmita T wrote:

Hi Primal,

If you can not use modal then you can add the warning message in container. And add that container in an if condtion and give the condtion when the checkbox is selected as disagree then only the container will display otherwise not.


Thanks,

Sushmita

Or simply you can set the container's display property that when the checkbox is selected as disagree. Then it will display only when you select the disagree checkbox.

Thanks,

Sushmita


Solution

Primal Lobo,

In OutSystems 10 (using Silk UI) you should also have a Modal. If you are not using Silk UI, you can also use the PopUp_Editor from RichWidgets to implement a popup.

If you only have one Check Box for 'Agree' (let's assume its Variable property is configure with the local variable HasAgreed), I'd still implement it with an OnChange. In the Screen Action that handles it I'd check if the value of HasAgreed is False, in which case I'd display the Modal/Popup.

Hope this helps!

Solution

Sushmita T wrote:

Sushmita T wrote:

Hi Primal,

If you can not use modal then you can add the warning message in container. And add that container in an if condtion and give the condtion when the checkbox is selected as disagree then only the container will display otherwise not.


Thanks,

Sushmita

Or simply you can set the container's display property that when the checkbox is selected as disagree. Then it will display only when you select the disagree checkbox.

Thanks,

Sushmita


Hi Sushmita T,

Why you don't use select box and onChange event?