Skip to main content

Hi,

I am trying to populate a text field based on a calculated value, but I have been unsuccessful.  The logic I'm using is:

 

  • Form custom javascript equals:

 

              function UpdateTextBox(inpval){
                 NWF$('RiskRankingHSEScore'+TextBox).val(inpval);
                 return inpval;
              }

 

I have used this logic based on advice in a similar forum question, but for some reason it just isn't working for me so suspect there is more to it and I'm missing something.

Thank you!

Hi Christina Gateley‌ ,

Two things to note here :

1] Set the Client ID JavaScript variable name of the text field as RiskRankingHSEScore

2] Update the custom JavaScript code as below :

function UpdateTextBox(inpval){
NWF$('#'+ RiskRankingHSEScore).val(inpval);
return "";
}

Regards,

Saud Khatri


Perfect!  Thank you very much, Saud.

Best wishes,

Christina.


Reply