Copy link to clipboard
Copied
Hello,
I am currently trying to create a PDF of a schedule, where a user can select their desired program from a dropdown and the button will automatically have the corresponding link.
I followed this tutorial to get the dropdown selection to effect a text field (successfully), but have no idea how to have the dropdown edit the link or button element, OR have the text field (based on the dropdown) effect the link/button. (I say link/button because I can use whichever works!)
Any assistance or links would be amazing, I've tried googling but no one else that I could find seems to want to do this.
Thanks,
Sarah
Ah OK, got it. Let's say the text field is called "Text1". You can then use this code as the MouseUp event of the button field:
var t1 = this.getField("Text1").valueAsString;
if (t1=="") app.alert("The field is empty.");
else app.launchURL(t1);
Copy link to clipboard
Copied
Please be a bit more specific. Do you want to use the value of the text field in the URL? So if the text field says "Text1" the URL that the button will launch will be "http://www.google.com/q/Text1", for example?
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Ah OK, got it. Let's say the text field is called "Text1". You can then use this code as the MouseUp event of the button field:
var t1 = this.getField("Text1").valueAsString;
if (t1=="") app.alert("The field is empty.");
else app.launchURL(t1);
Copy link to clipboard
Copied
You are a LIFE SAVER.
Thank you so much! This worked perfectly. Is there a way to give kudos on here?
Copy link to clipboard
Copied
You're welcome!
Marking the answer as correct (and maybe liking it) is enough.