Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
1

Dropdown menu with hyperlinks to different URLs

Community Beginner ,
Jul 26, 2017 Jul 26, 2017

How do I create a dropdown menu with hyperlinks to several different URLs?

TOPICS
PDF forms
2.1K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 26, 2017 Jul 26, 2017

A drop-down menu can only contain plain-text. However, a script can be used to launch the selected text in the browser.

To do so, enter the following code as the field's custom validation script:

app.launchURL(event.value);

Make sure to tick the option to commit the selected value immediately, under the field's Properties, Options tab.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jul 26, 2017 Jul 26, 2017

Hi,

Thanks for the reply.

I have the part you have listed, but I need assistance with making sure that when I click on the plain text within the dropdown that only one URL will open and that URL matches the plain text within the dropdown. For example, when people click on Spring 2015 in the dropdown it needs to take them to http://econnect.dcccd.edu/econnect/Schedule/spring.2015/index.html only.

I do not want all URLs to open; just the URL that connects to the specific semester selected. I think I need Custom Keystroke Script, maybe?

Thanks for any additional assistance you can provide.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 26, 2017 Jul 26, 2017

The code I provided does that, but it requires that you use the URL as the display item. If you have a "default" value or want the display and export values to be different it would require a more complex script.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jul 26, 2017 Jul 26, 2017
LATEST

That is exactly what I want: the display and export values to be different.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines