Hi All,
I am very new to JS.
I want a series of buttons, when one of them is clicked, it will write a certain value to a text field hidden on my form.
I have given my single line text box a JS ID, called "TabRules".
On button1, I have set client click to "Tab1Function()"
Now I need help writing that function!
I tried this but no luck:
function Tab1Function () {
NWF$("Tab1").click();
document.getElementById("TabRules").value = "My value";
}
Solved! Go to Solution.
Hello Dave Georgopoulis you're close! Here's a few updates to your scripts that should get you working!
Custom JavaScript in Form Settings:
function Tab1Function () {
NWF$('#' + TabRules).val("My value");
}
JavaScript within your custom button's Client Click property:
NWF$(document).ready(function(){
Tab1Function();
});
A few Notes:
Good luck!
Wow! Thank you so much Patrick!
I can't believe I was "close" but I appreciate the encouragement!
The writing to the field is working perfectly!
Now I just have to figure out why rules won't fire!
thanks again
No problem Dave Georgopoulis – happy to help!
How can we do the same to set a value on a SQL request control. which is rendered as Label.
Hi Patrick,
I am wanting to do the same action with replacing a value, but I want to take a people picker field and set it to nothing. Is there a way to do this that you know of?