Problems populating text field from calculated value

  • 1 November 2017
  • 2 replies
  • 5 views

Badge +4

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!


2 replies

Badge +6

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

Badge +4

Perfect!  Thank you very much, Saud.

Best wishes,

Christina.

Reply