Need help scripting text field dependant on drop down menu but also auto-populate
I need help creating/scripting a text field that's dependent on a drop down menu, but also having the text field auto-populate to another text field
I'm really not great at scripting, and I apologise in advance I'm really dense when it comes the coding terminology, lol
but I've managed to workout 90% of what I need the Custom Calculate Script to do,
This is what I have so far:
if (event.value == "Option1")
{
var field1Value = this.getField("index1").value;
this.getField("text combo").value = field1Value;
}
If I type text into the “index1” field, it works good and updates the “text combo” field,
but not the other way around
I know if I want it to work the other way around then just swap “text combo” with “index1”
but I need them to both work and I don’t know how to make the script to be able to do both at the same time
I tried adding both of these scripts into the “Run custom Calculate script” box like this, but I couldn’t get them both to work together 😬
if (event.value == "Option1")
{
var field1Value = this.getField("index1").value;
this.getField("text combo").value = field1Value;
}
{
var field1Value = this.getField("text combo").value;
this.getField("index1).value = field1Value;
}
anyone have any ideas?
