Copy link to clipboard
Copied
Hello,
Is it possible to type into a field that is set to autogenerate information from a selected checkbox?
Example:
I have four checkboxes on page one of myy PDF that generate predermined phrases into a field located on page two. I'd like to add an additional field called 'Other'. I want the user to be able to type unrestricted information into the Other field and have the information generated in to the field on page two.
Below is the code I've applied to the field on page two. Is there anything I can add to get the desired results?
var a=""
if (this.getField("CB1").value == "Yes")
{
a="\u2610 Option One \n"
}
if (this.getField("CB2").value == "Yes")
{
a=a + "\u2610 Option Two \n"
}
if (this.getField("CB3").value == "Yes")
{
a=a + "\u2610 Option Three \n"
}
if (this.getField("CB4").value == "Yes")
{
a=a + "\u2610 Option Four \n"
}
event.value=a
Copy link to clipboard
Copied
Change your code to the following:
if (event.source && //^CB\d$/.test(event.source.name)) {
// rest of code goes here
}