Skip to main content

201027_pastedImage_2.png

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


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.


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

NWF.FormFiller.Functions.ProcessOnChange(ctrl_id);


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(); 
}

 


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.


Marian, where should I populate it?


Marian, where should I populate it?


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);

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


Reply