Copy link to clipboard
Copied
Please help. I am new to this and looking for a code to populate a text box with info from another text box by clicking a checkbox, and clearing the text box when the checkbox is unchecked.
Thank you in advance.
Questions similar to this one have been asked many times. Here is a search on this forum:
https://forums.adobe.com/search.jspa?q=Checkbox+textbox
In general, you'll need to Place some JavaScript code into the MouseUp Action on the checkbox.
Something like this.
if(event.target.isBoxChecked(0))
{// Checkbox is checked
this.getField("TargetField").value = this.getField("SourceField").value;
}
else
this.getField("TargetField").value = "";
You'll need to change the field names to match your form
Copy link to clipboard
Copied
Questions similar to this one have been asked many times. Here is a search on this forum:
https://forums.adobe.com/search.jspa?q=Checkbox+textbox
In general, you'll need to Place some JavaScript code into the MouseUp Action on the checkbox.
Something like this.
if(event.target.isBoxChecked(0))
{// Checkbox is checked
this.getField("TargetField").value = this.getField("SourceField").value;
}
else
this.getField("TargetField").value = "";
You'll need to change the field names to match your form
Copy link to clipboard
Copied
Thank you so much! This is exactly what I needed!