1 Reply Latest reply on Feb 9, 2016 11:28 PM by George_Johnson

    Create hyperlink in a text field

    senechia

      I have a form that is collecting data from a customer. The customers ID number is their phone number. This number is already know and stored in a text field "cPhone" in the form. After all of the data is collected on the form, I then need to navigate to the customers website where the last portion of the website url is their phone number that is already stored in field "cPhone". What I would like to happen is a hyperlink to the website be created, that ends in the customers phone number, and when clicked it will take you to that website. For example, the website url could be www.mywebsite.com/main/active/ and my customers phone number in "cPhone" is 800-555-5555, when some sort of action is taken, the two are combined, then it takes me to that webpage.

      Wether they are combined and an action is created to open a web link, or a hyperlink can be created on the page that can be clicked, or anything else in between. Can this be done?

        • 1. Re: Create hyperlink in a text field
          George_Johnson MVP & Adobe Community Professional

          Probably the easiest is to use a button. The action could be a JavaScript like:

           

          // Mouse Up script for a button

          app.launchURL("http://www.example.com/main/active/" + getField("cPhone").valueAsString, true);

           

           

          In practice you'll want to check the value of the phone number field to see that it's not blank and is complete, but this should get you started.

           

          You can use the buttonSetCaption field method to set the label of the button to the URL, perhaps in the Validate event of the phone number field.