We have a brand new look! Take a tour with us and explore the latest updates on Adobe Support Community.
I'm redesigning a custom quote sheet for a customer.
Really appreciate your time and any response.
What should happen when the check-box is not ticked? Should the other field be empty? Should it be editable by the user?
When the checkbox is not ticked, the second field should be empty.
I'm trying to eliminate any accidental input from the user, so both of these fields should not be editable by the user.
As the custom calculation script of the second text field enter the following (adjust the field names as needed):
event.value = (this.getField("Checkbox1").valueAsString=="Off") ? "" : this.getField("Text1").valueAsString;
Copy link to clipboard
Lets say first field is named 'Text1' and second field is named 'Text2',
add code to checkbox field as Mouse Up event.It will add value from first field to second if checkbox is checked and it will
remove value from second field if checkbox is unchecked.
this.getField("Text2").value = event.target.value != "Off" ? this.getField("Text1").value : "";
Unfortunately, I'm having some issues getting this to work properly. When the checkbox is ticked, it deletes the value in the first field and is not adding it to the second.
Put the prices into checkboxes as their "Export value".
In the "total" field just use the "Sum" calculation to make the sum of all checkboxes (in Acrobat's built in calculation, a unchecked checkbox acts as a zero value).
Thanks for the suggestion!
I was hoping that the checkbox would be able to draw from the value in the first box to allow the client to adjust that field when they have price increases throughout the year instead of needing to dive into the checkbox's properties.