Closed (fixed)
Project:
Webform
Version:
6.x-2.x-dev
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Reporter:
Created:
23 Apr 2009 at 02:02 UTC
Updated:
26 Mar 2010 at 12:01 UTC
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
Comment #1
quicksketchThis 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.Comment #2
notarealperson commentedThanks 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.
Comment #3
quicksketchYes, 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).
Comment #4
lazyguy commentedThis 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!
Comment #5
quicksketchComment #6
mikeschneik commentedI 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