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

I am having issues in submitting the nintex form. I have used customized jqyery and ajx call to populate the values in dropdown box. When i hit submit, it is throwing correlation id error.. Please suggest and I am not sure what I am doing anything wrong

Here is the customized jquery Code:

NWF$(document).ready(function(){

$("#.practiseClass").change(
    function() {
alert('variable change');
$NWF(".testVariableClass").val('test');
});
$("#.userTypeClass").change(
    function() {
alert('on chnage');
     $.ajax({
url: "http://lkmvwebdev13/IRestServiceImpl.svc/rest/GetEmployeeIDs/239844",
type: "GET",
header: { "Accept": "application/json;odata=verbose" },
contentType: "application/json; charset=utf-8",
processdata: true,
crossDomain: true,
dataType: "json",
cache: false,
success: function (msg) {
var json = JSON.parse(JSON.stringify(msg)).GetEmployeeIDsResult;
alert('hello' +json);
var options = "<option value='0'>(None)</option>";
$.each(json,function (i, val) {
                        $.each(val, function (k, v) {
                          //  alert(k + " : " + v);
                           options += "<option value='" + k + "'>" + v + "</option>";
                          //  $("#ddlName").get(0).options[$("#ddlName").get(0).options.length] = new Option(v, v);
                         // alert(k + " : " + v);
                        });
                    });
alert(options);
//NWF$(".practiseClass").find('option').remove().end().append(options);
//alert( NWF$("#" + dropDownID2+ ' option:selected').text());
}
});
       
    }
);
alert('test');
a=6;
b=8;
alert(a+b);
});

Labels: (2)
Tags (1)
0 Kudos
Reply
1 Reply
Workflow Hero

Re: I am having issues in submitting the nintex form. I have used customized jqyery and ajx call to populate the values in dropdown box. When i hit submit, it is throwing correlation id error.. Please suggest and I am not sure what I am doing anything wro

When you add custom options in a dropdown list with javascript and then you select one of these added options and submit the form, it throws the error you have.

You can only remove or hide options with Javascript.

So when editing your form, you need to configure the dropdown to have all the possible values and then using javascript, you can remove or hide options depending on your needs.

If this solution is not possible for you (as you are executing a web request to get information to populate your dropdown), here's a workaround that should work for you :

Filtering Dropdown using JQuery

Hope this helps

0 Kudos
Accept as Solution Reply