AnsweredAssumed Answered

Button to Set Field Value (JS)

Question asked by franco89 on Aug 2, 2016
Latest reply on Dec 11, 2017 by jsfree

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

}

Outcomes