Greetings,
Please forgive me if this has been asked and answered; I attempted to search for an answer. I am currently working in Adobe Designer (complete newbie) and I am sure I need javascript (also a newbie) to accomplish the following:
I have two radio buttons (1) Purchaser and (2) Contractor; there are multiple references throughout the document that should change to either "Purchaser" or "Contractor" depending on which of the radio buttons is selected.
NOTE: The radio buttons are grouped (porc)
NOTE: Each of the "references" has a text field
NOTE: Script exists but not working and I am attempting to remedy as this form is needed.
The following is the javascript present when looking at the radio button "group" in design mode:
____________________________________________________________________________
Any assistance you can provide would be greatly appreciated.
Thanks in advance.
~J
Solved! Go to Solution.
Views
Replies
Total Likes
Use this: the first line was for your reference:
Put various app.alert("test1"); inside your script to check at which line script is breaking. There might be an issue with som expressions in the script.
If you cant find it then share your form with me(vkatoch07@gmail.com).
I checked your form and I did two things to make it work:
1. Save as your form as "Adobe Dynamic XML form"
2. Remove all the script and use the below script in the click event of the radio group. It will work like butter :).
Thank you for your prompt reply and support. Unfortunately, I have not had success; when I attempt to preview the PDF, nothing happens. (I am sure I am missing something). I have attached a screenshot in hopes you can assist me once again. I truly appreciate you sharing your knowledge.
Thanks in advance,
J
Use this: the first line was for your reference:
Thank you, Vijay! Just like you said, "It works like butter." I am so grateful for your prompt replies and knowledge. Have an awesome day!
Greetings Everyone:
I am having a similar issue with the radio button functionality for another document. I attempted to use the code of the solution provided but it is not working. I updated the "target version," ensured I saved as "Dynamic XML," and I even went through to rename the objects in the hierarchy window to eliminate error. Still nothing and I am relatively sure I am missing something once more. Would it be possible to review my code:
form1.Page1.sect1.porc::click - (JavaScript, client)
if (this.rawValue == "1") {
xfa.resolveNode("form1.Page1.sect1.NotePurCon.value.#text").value = "Note to Purchaser";
xfa.resolveNode("form1.Page1.sect1.SectionIV.value.#text").value = "Section IV: Acceptance to be filled in by Purchaser";
//
}
else {
xfa.resolveNode("form1.Page1.sect1.NotePurCon.value.#text").value = "Note to Contractor";
xfa.resolveNode("form1.Page1.sect1.SectionIV.value.#text").value = "Section IV: Acceptance to be filled in by Contractor";
//
}
Also, would anyone have any good reference material for javascript; as I hate to burden the community with my challenges.
Any assistance you can provide would be greatly appreciated.
Thank you in advance.
~J
For these two fields, you have taken the text object, that's why not working.
Take textField instead and then set the value.
Thank you for the prompt reply. I apologize for being unaware; however, when you say, "Take textField instead," do you mean to replace #text with #textField in the code? Such as:
xfa.resolveNode("form1.Page1.sect1.NotePurCon.value.#textField").value = "Note to Purchaser";
Thank you for your patience and understanding.
Your script is fine. The issue is with "NotePurCon" field. Delete this field and drag it again from Object library.
You are AWESOME! Thank you so much. Fixing the one field as you suggested corrected everything. I guess there was an issue with the text box (maybe I should not copy and paste text objects...LOL. Lesson learned!). I cannot thank you enough!
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies