Greetings,

Is there any way to have each item in a select list be an html link to another page? Using basic html linking the formatting came out totally screwed up.

Any help would be greatly appreciated.

Thanks!

jimi

Comments

quicksketch’s picture

This isn't possible in HTML. The <select> tag does not support HTML within its <option> tags, making this impossible within normal HTML. Any implementations you might have seen that did include HTML were probably JavaScript based implementations. However considering that Webform doesn't supply any of this specialty behavior, I don't think this is possible within Webform.

notarealperson’s picture

Thanks for your reply quicksketch.

I was just messing around and it seemed to work just fine when I used the format: key|htmllink

Does that make sense?

Also, could you clarify the use of the key for me? I'm not clear what it's function is and I couldn't find any documentation about it. Is it just a unique marker to identify that option?

Thanks for your time and help.

quicksketch’s picture

Yes, the "key" value is what is saved in the database, while the "readable option" is what's shown to the user when they fill out the form. Using keys is always a good idea anyway, since it makes it possible to change the value shown to the user, but keep the value stored in the database unchanged (so the statistics continue to tally up for the old key, since it didn't change).

lazyguy’s picture

This does work, you're right, and it's handy for adding those little 'more info' links. (I used the old and long-deprecated small tags to make my link tiny just now but, of course, one should class and style them instead.)

Thanks for the tip!

quicksketch’s picture

Status: Active » Closed (fixed)
mikeschneik’s picture

Version: 6.x-2.6 » 6.x-2.x-dev
Assigned: Unassigned » mikeschneik

I want to create a list like this

http://de.selfhtml.org/html/formulare/auswahl.htm#listen_absendewert

I should be includet with an value-tag within the option-tag.

how can I realise this in drupal?

Thanks