you can do it eg. following way
- update formula in calc value control to something like: <Exististing formula> + UpdateTextBox()
- define javascript function like
function UpdateTextBox(){
NWF$('#'+TextBox).val('Email');
return "";
}
Thank you. This worked perfectly.
Hi Marian,
I would like to use this example, but when I tried it didn't work for me. I have obviously misunderstood something.
- I updated my calculated value field to include the + UpdateTextBox()
- I went to my form settings and put the javascript in, changing 'Email' the name of my text field
- When I previewed the form the calculated field value didn't appear in the text field
Have I missed a step?
Thank you,
Christina.
above script was just an example how to 'simulate' resp. capture calculated control change event. and it just set "Email" string to text box.
if you want to set text box value to a value of calculated control control itsef use something like following
UpdateTextBox(<Existing formula>)
function UpdateTextBox(inpval){
NWF$('#'+TextBox).val(inpval);
return inpval;
}
Thanks, Marian. Forgive me, but this is really new to me and I'm unsure how to make this work.
So far I have added the first line to the calculated field so that it now reads:
I then copied the second part into the form settings. I'm presuming I change the '#' for the name of the text field that I want to copy the calculated value in to, i.e.:
function UpdateTextBox(inpval){
NWF$('RiskRankingHSEScore'+TextBox).val(inpval);
return inpval;
}
Is this all correct?
THANK YOU!
everything is correct except of
NWF$('RiskRankingHSEScore'+TextBox).val(inpval);
it should have been
NWF$('#' + RiskRankingHSEScore).val(inpval);
where RiskRankingHSEScore is javascript variable configured for text control, not its name.
if that still doesn't work or anything is still not clear I would suggest to start new question so that this thread doesn't confusing dealing with several different problems.
Thank You. It worked perfectly. Time saved!!
Hello guys, I was following this thread and tried the solution
I have updated my calculated values to = UpdateTextBox(Q3+W3)
And updated the settings – form and entered this scrip
function UpdateTextBox(inpval){
NWF$('#' + E3).val(inpval);
return inpval;
}
After updating
I select the preview form to test it but when run “Preview Form” it will only show like this. please wait
Did I miss something?
Im using share point/Nintex 2013