Adding URLs/links to a dropdown menu

Hello!

I need a way to select between hyperlinks in a dropdown menu, in a way that when selecting one of the items, it would insert a text with a valid link embedded in it, so anyone can click on it (like this one) Is it possible to be done?

Thank you!!

1 Like

Hi @Arthur_L ,
Greetings.
Are you looking for something like this?

{note: preview=no}{links=[
["name":"Google", "text":"Search", "link":"https://google.com"],
["name":"Linkedin", "text":"Page", "link":"https://linkedin.com"],
["name":"Text Blaze", "text":"Tool", "link":"https://blaze.today"]
]}{endnote}
{note}{formmenu: values={=links}; itemformatter=(l) -> l["name"]; name=selected}{endnote}
Check out {link:{=selected["link"]}}{=selected["text"]}{endlink}

3 Likes

sorry for cutting in,
I tried this but it seems to be an unnecessary line break in the top two lines.

You can fix that by either removing the new line after the commands or using the trim option, like below:

{note: preview=no}{links=[
["name":"Google", "text":"Search", "link":"https://google.com 1"],
["name":"Linkedin", "text":"Page", "link":"https://linkedin.com 1"],
["name":"Text Blaze", "text":"Tool", "link":"https://blaze.today"]
]}{endnote: trim=yes}
{note}{formmenu: values={=links}; itemformatter=(l) -> l["name"]; name=selected}{endnote: trim=yes}
Check out {link: {=selected["link"]}}{=selected["text"]}{endlink}

1 Like