Radio button client side validation by message

Hello

Does any body know how to check the validation on client side?

I put 3 radio button, and one button widget. When i click the button , i like to show the message.

What is necessary to finish this?when i debug them, the arrow does not go to the widget message.

The file is attached and please see the screen name"validation check"


Thank you in ahead.

Sincerely,

EM

Hi EiMon,

You are refreshing the Message Container, but that's inside the If, so the condition of the If is never reevaluated. What you need to do is give the If a Name (i.e. set the Name Property) and Ajax Refresh that instead of the Container.

Kilian Hekhuis wrote:

Hi EiMon,

You are refreshing the Message Container, but that's inside the If, so the condition of the If is never reevaluated. What you need to do is give the If a Name (i.e. set the Name Property) and Ajax Refresh that instead of the Container.


Hello Kilian

Thank you for the quick teaching.

i can debug the If widget now, but sadly the message does not appear yet when the button is clicked not chosen radio button .

Thank again,

Solution

Hi EiMon,

Just to make sure, you gave the If Widget a name, and that's the name you are using in the Ajax Refresh? Did you check the value of IsValid in the debugger? I've attached a simple example that shows how to do it.

Solution

Kilian Hekhuis wrote:

Hi EiMon,

Just to make sure, you gave the If Widget a name, and that's the name you are using in the Ajax Refresh? Did you check the value of IsValid in the debugger? I've attached a simple example that shows how to do it.

Hello Kilian 

I did not know that it is possible to assign the Text value in the radio button. This sample module help me for the further study. Thank you very much.


EiMon


Hi EiMon,

Glad I could be of help. Indeed, you need to assign a common Variable to all Radio Buttons in the same group, and also specify the value that the Variable will get if the user selects that specific Radio Button. Also note that if you set the initial value of the Variable to one of the Radio Button values, that Radio Button will be selected automatically.

Happy coding!