Copy link to clipboard
I have two unique form fields.
I am attaching a screen shot of the form fields.
The first form field is called #1.
The second form field is called #2.
The third form field is called #3.
When someone enters an answer into EITHER #1 OR #2, i want that answer to be pre-populated to #3. If #1 is blank, but #2 has a response, then that response goes into #3.
Same is true if #2 is left but #1 has a response, then that response should go to #3.
How can i accomplish this? I am using Adobe Acrobat Pro DC. If there is coding i need to put, where and how do i do this?
What happen if both fields are filled?
You can use this as custom calculation of "#3" field:
var a = this.getField("#1").value;var b = this.getField("#2").value;if(a &&!b)event.value = a;else if(!a && b)event.value = b;elseevent.value = "";
where do i enter this code? can you provide screen shots?
both fields will not be filled in, either one of the fields will be filled in, that's how the questions is designed, the user should not be answering both questions.