AnsweredAssumed Answered

Repeating section populated dynamically drop down list options

Question asked by leventkoc on Dec 24, 2018
Latest reply on Jan 2, 2019 by chaddavis

Hi,

I have a drop down list in the second repeating section, where the option values are populated dynamically using JavaScript below.

 

var rs1drpFirma= NWF$('[data-controlname="rs1drpFirma"] select');

NWF$('[data-controlname="rs1drpFirma"] select').on("focus", function ()
{
   var length = $('[data-controlname="rs0FirmaAdi"]').find("input").not(":input.nf-hidden-associated-control").length;
   var optionsAsString = "";
   var list = $('[data-controlname="rs0FirmaAdi"]').find("input").not(":input.nf-hidden-associated-control");

   for (var i = 1; i < length; i++)
   {
      optionsAsString += '<option value="' + list[i].value + '" data-nfchoicevalue="' + list[i].value + '">' + list[i].value + '</option>';  

      $(this).html(optionsAsString);
   }
});

 

This works fine. When I submit this form values, I am getting a sharepoint error. How can I fix this problem?

 

 

Thanks

Outcomes