I dynamically populate repeating section fields they became labels and are not saved in list. How to save them?

  • 21 March 2017
  • 9 replies
  • 4 views

Badge +2

201027_pastedImage_2.png


9 replies

Badge +1

Let me know what is your mode while loading the repeating section, Edit or New and also if you have any rule to disable the controls remove it and try, make sure to connect this repeating section to a Multline text in sharepoint list

Badge +2

I tried both modes: New and Edit. I do not have any rules. Yes, it is connected to the Multiline. I populated these fields using script. All those fields are from calculated value fields.

Badge +9

Have You tried to trigger a change event for the fields:

NWF.FormFiller.Functions.ProcessOnChange(ctrl_id);

Badge +2

Manfred, it does not work. I execute addRowToMySection function on click.

function addRowToMySection() 
  {
   var rs = null;
  NWF$(document).ready(function() {
  rs = NWF$(".MOsRep .nf-repeater-row:last"); 
   var lookUpTaxId = NWF$("#" + CalcTaxId);
  var lookUpTaxIdVal = lookUpTaxId.val();
  var taxId = NWF$(rs).find(" .repMosTaxId");

var fName = NWF$(rs).find(".repMosFirst ");
  var lName = NWF$(rs).find(".repMosLast");
  var rank = NWF$(rs).find(".repMosRank");
  var cmdCode =  NWF$(rs).find(".repMosCmdCode");
  var cmdName = NWF$(rs).find(".repMosCmdName");
  var calcFName= NWF$("#" + Calc_fnm);

 var fVal = calcFName.val();
  var sqlLName= NWF$("#" + Calc_lnm);
  var lVal = sqlLName.val();
  var sqlRank= NWF$("#" + Calc_rank);
  var rankVal = sqlRank.val();
  var sqlCmdCode= NWF$("#" + Calc_cmdCode);
  var CmdCodelVal = sqlCmdCode.val();

var sqlCmdName = NWF$("#" + Calc_cmdName);
  var cmdNameVal = sqlCmdName.val();
  if (lookUpTaxIdVal == "")
{
 alert ( lookUpTaxIdVal + " is not found");
}
else

{

NWF$ (taxId.text(lookUpTaxIdVal) );
 NWF$(fName.text(fVal));
  NWF$(lName.text(lVal));
  NWF$(rank.text( rankVal));
  NWF$(cmdCode.text(CmdCodelVal));
  NWF$(cmdName.text(cmdNameVal));
   NWF.FormFiller.Functions.ProcessOnChange(cmdName);
 }

});
  NWF$(".MOsRep").find('a').click(); 
}

 

Userlevel 5
Badge +14

all those line like

 NWF$(fName.text(fVal));

are incorrect and cause to turn controls into 'label'

examine DOM, you are trying to  populate value at wrong level.

Badge +2

Marian, where should I populate it?

Badge +2

Marian, where should I populate it?

Userlevel 5
Badge +14

hard to guess how you have structured your form and what elements you address with lot of different classes within your code,  just off top of head I think something like this might work (or at least point you to working direction)

fName.find('.nf-associated-control').val(fVal);
Badge +2

Yes, Marian, it is right. Thank you very much.

Reply