Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
example (that does nothing and doesn't work):
$form['personal']['phone'] = array(
'#type' => 'phone',
'#title' => t('Phone'),
'#required' => TRUE,
'#default_value' => "",
'#description' => "Please enter your phone.",
);
surely there is a trick to this that I'm missing?
Comments
Comment #1
themselves CreditAttribution: themselves commentedNo one? It's not possible to use these fields from the Form API?
Comment #2
Anonymous (not verified) CreditAttribution: Anonymous commentedSeconded.
Comment #3
hobo CreditAttribution: hobo commentedthird.. can i add this field to a from using fapi?
Comment #4
Anonymous (not verified) CreditAttribution: Anonymous commentedObviously the best way to do it would be create a fieldgroup using the Form API and nesting 3 fields in it. It's just the validation and submission functions won't be very fun to come up with...
Comment #5
MustangGB CreditAttribution: MustangGB commentedAny ideas on this one yet?
Comment #6
-enzo- CreditAttribution: -enzo- commentedSeconded
Comment #7
cweagansIn 7.x, you can't do this just yet. 7.x-2.x is NOT production ready, and it probably won't be for a while. I've been slowly working on it, but I don't have a lot of time these days.
In 6.x, you should be able to use the phone_textfield element (see http://drupalcode.org/project/phone.git/blob/refs/heads/6.x-1.x:/phone.m...)
Postponing this to make sure support for FAPI is in 7.x-2.x
Comment #8
bradjones1Comment #9
zkent CreditAttribution: zkent as a volunteer commentedHow about now?
Comment #10
gangaloo CreditAttribution: gangaloo commentedI agree with @zkent. Is this now possible with the current dev version?
Thanks in advance.