I have a form that, if one checkmark is "TRUE" then many other field should not be filled
What I want is that, if the user checkmarks that field, 5 other fields should be set to "read-only" with a specific text N/A and another checkmark field should be "TRUE"
Also if the checkmark is removed, or "FALSE" then that read-only status should be eliminated.
Any javascript to do this? Thanks in advance.
Change properties of another field SOLVED
Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Tracker Supp-Stefan
- TrackerSupp-Daniel
- Site Admin
- Posts: 8579
- Joined: Wed Jan 03, 2018 6:52 pm
Re: Change properties of another field
Hi, Ocasio
This should be possible using JavaScript, however I am afraid that I cannot assist in the initial creation of the script itself. Please see the Adobe JS API reference here for assistance with which methods to use for your inquiry:
https://www.adobe.com/content/dam/acom/ ... erence.pdf
(Readonly seems to be detailed on both pages 68 and 437)
Kind regards,
This should be possible using JavaScript, however I am afraid that I cannot assist in the initial creation of the script itself. Please see the Adobe JS API reference here for assistance with which methods to use for your inquiry:
https://www.adobe.com/content/dam/acom/ ... erence.pdf
(Readonly seems to be detailed on both pages 68 and 437)
Kind regards,
Dan McIntyre - Support Technician
Tracker Software Products (Canada) LTD
+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
Tracker Software Products (Canada) LTD
+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
Re: Change properties of another field
Thank you, im trying but I dont see how to make it work with a checkmark value. Is it mouse up? Down?
- TrackerSupp-Daniel
- Site Admin
- Posts: 8579
- Joined: Wed Jan 03, 2018 6:52 pm
Re: Change properties of another field SOLVED
Hi, Ocasio
Mouseup/down is when to run that, they are effectively the same except one is applied immediately upon depressing the mouse button while over the field, the other is applied only when releasing the mousebutton. Mouseup is used most often as it allows the user the depress the mouse and then realize before releasing it that they did not want to make the change, and move the mouse away from the field before releasing.
You would generally be applying the JS to the other fields however, not the checkboxes themselves, and having them check the "true/false" value of the checkbox in question. If the box is checked (true) then apply "readonly" to the current field, if the checkbox is not checked, remove that property. In this case, you would want to use the "value calculation" field, as a "custom action". Please see this article for details on creation fillable forms: https://www.pdf-xchange.com/knowle ... -PDF-forms
Kind regards,
Mouseup/down is when to run that, they are effectively the same except one is applied immediately upon depressing the mouse button while over the field, the other is applied only when releasing the mousebutton. Mouseup is used most often as it allows the user the depress the mouse and then realize before releasing it that they did not want to make the change, and move the mouse away from the field before releasing.
You would generally be applying the JS to the other fields however, not the checkboxes themselves, and having them check the "true/false" value of the checkbox in question. If the box is checked (true) then apply "readonly" to the current field, if the checkbox is not checked, remove that property. In this case, you would want to use the "value calculation" field, as a "custom action". Please see this article for details on creation fillable forms: https://www.pdf-xchange.com/knowle ... -PDF-forms
Kind regards,
Dan McIntyre - Support Technician
Tracker Software Products (Canada) LTD
+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
Tracker Software Products (Canada) LTD
+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
Re: Change properties of another field
I just did this and worked with mouse up as suggested
My intention was to clear and disable many other fields if a specific field is checkmarked
My intention was to clear and disable many other fields if a specific field is checkmarked
Code: Select all
var D = this.getField("Main_Checkmar");
var NA = this.getField("Text_Field").value;
var DMC = this.getField("Secondary_Checkmark");
{
if (NA == "Off"){
D.value = "Write here";
D.readonly = false;
}
else if (NA == "Yes"){
D.value = "N/A";
D.readonly = true;
DMC.readonly = true;
DMC.value = "Off"
}
}
- TrackerSupp-Daniel
- Site Admin
- Posts: 8579
- Joined: Wed Jan 03, 2018 6:52 pm
Re: Change properties of another field
Hi, Ocasio
Glad to see that you've found a solution!
Have a great day
Glad to see that you've found a solution!
Have a great day
Dan McIntyre - Support Technician
Tracker Software Products (Canada) LTD
+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
Tracker Software Products (Canada) LTD
+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com