cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Not applicable

How to retrieve the values from the drop down control

Hello Friends,

I have a drop down control with few values in it. I want to get the values and display it in pop-up. This is what I have done

Step 1: 

Step 2: In the form settings, I'm using this function

However, I'm not able to get the selected value and display that in pop up. Please advise

Reply
8 Replies
Highlighted
Automation Master
Automation Master

Re: How to retrieve the values from the drop down control

in general, you have to define javascript variable for a control at the bottom of configuration dialog.

so the 'ChoiceControl' should have been that javascript variable and not control name.

specifically for validation function, have a look to help for how does it should look like.

nintex passed to the validation  function source control where you can read value form

http://help.nintex.com/en-US/nintex2013/help/#Forms/RootCategory/Controls/Nintex.Forms.Controls.Sing... 

Reply
Highlighted
Not applicable

Re: How to retrieve the values from the drop down control

Hello ‌, correct me if I'm wrong, but you want me to replace ChoiceControl with validate? I don't think it will work.

Reply
Highlighted
Automation Master
Automation Master

Re: How to retrieve the values from the drop down control

not at all.

I just commented in your screenshot where you call your javascript function for custom validation.

Reply
Highlighted
Not applicable

Re: How to retrieve the values from the drop down control

If it's not too much trouble, could you please let me know how it's done? Maybe a step-by-step approach would work

Reply
Highlighted
Automation Master
Automation Master

Re: How to retrieve the values from the drop down control

what should trigger the pop up  to appear?

Reply
Highlighted
Not applicable

Re: How to retrieve the values from the drop down control

When a user selects any options from the drop down, a pop-up relevant to that choice should appear

Reply
Highlighted
Nintex Employee
Nintex Employee

Re: How to retrieve the values from the drop down control

Hi ChandraShekhar R,

The following blog post should help. Just select the NWF$('#' + JSVariableID + ' option:selected').val() to show up in the alert().

New Dialog: Add a Dialog Box in Your Nintex Forms — inFormed 

Thank you,

Sean 

0 Kudos
Reply
Highlighted
Automation Master
Automation Master

Re: How to retrieve the values from the drop down control

then I would suggest not to misuse control's custom validation capability but rather to define onchange handler for the choice control.

despite it might seem to work from custom validation, custom validation is not intended for these kind of customization. and most likely you will get one additional alert when validation is fired at the form submit.

your code should basically work, you just need to make 'ChoiceControl' javascript variable for choice control (instead of/apart from control name)

NWF.FormFiller.Events.RegisterAfterReady(function () { 
    NWF$('#'+ChoiceControl).change(function(){
        alert('Title');
        var selection = NWF$('#'+ChoiceControl);
        var selectionText = selection.val();
        alert(selectionText);
    })
})
0 Kudos
Reply