Closed (fixed)
Project:
Double Field
Version:
7.x-1.0
Component:
Miscellaneous
Priority:
Minor
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
22 Dec 2011 at 21:34 UTC
Updated:
23 Dec 2011 at 17:56 UTC
Its embarrassing to say this but I can not think of a real life scenario where this module would become handy.
I would love to hear a couple of different use cases where this module would serve greatly.
Thank you so much...
Comments
Comment #1
apmsooner commentedHow about business hours 1st field open time and 2nd field close time?
How about phone number if 1st field and extension in 2nd field?
Comment #2
threewestwinds commentedI have found the need for key/value pairs exceedingly common - I've used a version of this module on almost every work project I've had to so far.
X-Y pairs are the most common example, but also Merchant ID / Terminal ID for credit-card readers. They're almost never directly user-facing in my experience (handled via a custom widget), and highly dependent on project, but also very common.
Comment #3
hgurol commentedI can not reach/use each field separately thru views, can I ?
If I can reach/use each field separately, I start to see the usage very well but Im still having problems to see the advantage if the only way I can see/use the pair as is.
Comment #4
apmsooner commentedYes you can. Just add the double field twice and rewrite the output for each token value. In my example, these are the token values for example field:
[field_user_shop_hours] == User: Business Hours
[field_user_shop_hours-first] == Raw first
[field_user_shop_hours-second] == Raw second
So, you could create the first double field with rewrite output to the first subfield and then the second double field to the second subfield.
Comment #5
hgurol commentedGreat :)
Thank you guys for taking the time.
Comment #6
chi commentedJust a note that using raw values is potentially dangerous. Use Strip HTML tags checkbox in Rewrite results section of the view to prevent XSS vulnerability.
Comment #7
chi commented