Skip to main content
Nintex Community Menu Bar

Display the text value of radio/choice control

  • January 29, 2018
  • 2 replies
  • 75 views

Forum|alt.badge.img

I have a choice control (radio button) and save button.

What I wanted to do is to display the text of the selected radio button in the alert

But the below javascript doesn't seem to work when I put the code in 'On Click' of Save Button.

var varCond1 = NWF$('#' + Condition1 + 'option:selected').text();
alert(varCond1);

Platform: Ninex Forms for Office 365

2 replies

Forum|alt.badge.img+3
  • January 30, 2018

1. Just add a "Custom validation function" for a choice control (radio button), example: testAlert

2. In Settings, add Custom Javascript with:

function testAlert(source, arguments){
alert("yourSelectedValue");
arguments.IsValid = true;
}

3. Publish and test with "Save" button


Forum|alt.badge.img+9
  • January 30, 2018

Please try

NWF$('#' + Condition1 ).find("input:checked").val();