Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
When you're entering a phone number you write the country code first, so shouldn't the country selector show before the phone number's text field?
Comment | File | Size | Author |
---|---|---|---|
#12 | cck_phone-cc_position-1240012-12.patch | 2.5 KB | rooby |
#11 | cck_phone-cc_position-1240012-11.patch | 2.5 KB | rooby |
#5 | cck_phone-n1240012-5-d6.patch | 2.46 KB | DamienMcKenna |
#1 | cck_phone-n1240012.patch | 2.07 KB | DamienMcKenna |
Comments
Comment #1
DamienMcKennaHere's a patch that just swaps the order of the $element['country_codes'] and $element['number'] arrays in cck_phone_phone_number_process(), that's all it took.
Comment #2
DamienMcKennaComment #3
roball CreditAttribution: roball commented+1
Could you please also provide a patch for the 6.x-1.x branch?
Comment #4
roball CreditAttribution: roball commentedAnybody else interested in this feature for D6?
Comment #5
DamienMcKennaHere's a patch for D6 - untested, but I just changed the order of the fields.
Comment #6
dboulet CreditAttribution: dboulet commentedMakes sense to me. Patch in #1 works fine.
Comment #7
ckngNot really, most prefer phone number first before country code selector. However I anticipated this request to come sooner or later. =)
So the best option is to let users decide themselves. This will be ideally implemented in a way user choose the display sequence of the country code
Country Code Display:
- front/before phone number textfield
- rear/after phone number textfield
with rear as default, so not to break existing site
Comment #8
roball CreditAttribution: roball commentedSo anyone willing to create a patch implementing #7?
Comment #9
rooby CreditAttribution: rooby commentedI'll do it in the next day or two if no one else beats me to it.
Comment #10
roball CreditAttribution: roball commentedGreat - I'll test it once it is out.
Comment #11
rooby CreditAttribution: rooby commentedSorry, I lost track of this one.
Here is a patch for drupal 7 that adds a new option for country code position.
Comment #12
rooby CreditAttribution: rooby commentedOops, the previous patch has the extension in the wrong place.
This one addresses that.
On a side note, maybe an option to display the country code at the very end might be useful to someone also?
A little list of the sub elements in a weight draggable table would be pretty cool so people could have whatever order they want, although that would probbaly be overkill when there are only 3 parts.
Anyway, I'm just rambling, this should suit pretty much everyone I would imagine.
Comment #13
nikemen CreditAttribution: nikemen commentedRelease, please!
Comment #14
rooby CreditAttribution: rooby commented@nikemen:
Are you saying you have used the patch and it works as expected?
Comment #15
nikemen CreditAttribution: nikemen commented@rooby
Yes, indeed it works like a charm.
Comment #16
roball CreditAttribution: roball commentedThen the status could be changed to RTBTC. Anybody willing to port the patch to D6?
Comment #17
ckngThanks for the patch. Committed.
dragable any order & country code at the very end? They can open new issue for that. =)
Comment #18
ckngper #16 request, if anyone is up for this feature