Copy link to clipboard
Copied
so i created a checkbox which will hide fields when checked (mouse up)
why dont the values come back when the box is unchecked? how do i do this?
Copy link to clipboard
Copied
so i created a checkbox which will hide fields when checked (mouse up)
why dont the values come back when the box is unchecked? how do i do this?
Copy link to clipboard
Copied
How did you set it up? Did you use a script? If so, post the code you used.
Copy link to clipboard
Copied
no, i just went through properties and used actions and put each field individually that i wanted hidden.. figuring if u uncheck the box they would reappear, which doesnt happen
Copy link to clipboard
Copied
If you want it to be conditional you have to use a script.
Copy link to clipboard
Copied
okay ill try figure this out, i have no experience with this stuff
Copy link to clipboard
Copied
if (event.target.value != "Off") {
// box is checked
this.getField("var1").display = display.visible ;
this.getField("var2").display = display.visible ;
} else {
// box is unchecked
this.getField("var1").display = display.hidden ;
this.getField("var2").display = display.hidden ;
}
found this one, it works.. thanks!
Copy link to clipboard
Copied
followup, the script works.. just changed the hidden/visible for if its checked or not.. but is there a way i can just make a dropdown choice that is on the form automatically check the box?
Copy link to clipboard
Copied
You can add a validation script on the dropdown menu:
In the below example the choices in the dropdown are 'y' , 'n', ' ' or anything other than that. And adjusts the value of field f. but can be used for anything you'd like.
var f = this.getField("texterino")
if (event.value=="y") {
f.value = 'y'
}else if (event.value=="n") {
f.value = 'n'
}else if (event.value==" ") {
f.value = ' '
} else { f.value = 'else'
}
Hope this helps!