Allow user to have a phone type (Mobile, Home, Office, etc) associated with a phone number.
liveoutloud2day - June 27, 2008 - 19:46
| Project: | Phone (CCK) |
| Version: | 6.x-2.8 |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs work |
Description
I took a different approach than http://drupal.org/node/205651 with this patch. I have included a CSS file to help format it correctly in the form, and I also added an install file to handle the update from one -> two fields. The update works with both single and multi-fields. This patch file applies cleanly against 5.x-2.11

#1
Woops - how about the patch file?
#2
Oh - the above patch applies cleanly with any of the patches I submitted, except in combination with this one - http://drupal.org/node/275837 - This version of the patch applies after you have applied the "range" patch.
#3
Hi,
I think you forgot in phone.css to define the following elements :
phone-fields-end-wrapper
phone-field-end-wrapper
#4
You'll probably want to add some
t()calls.E.g.
<?php$order_options = array('Mobile' => 'Mobile', 'Home' => 'Home', 'Office' => 'Office', 'Apt' => 'Apt', 'Dorm' => 'Dorm', 'Fax' => 'Fax');
?>
<?php$order_options = array(
'Mobile' => t('Mobile'),
'Home' => t('Home'),
'Office' => t('Office'),
'Apt' => t('Apt'), // Perhaps "Apartment" instead, for the value?
'Dorm' => t('Dorm'),
'Fax' => t('Fax'),
);
?>
Both for better compliace with Drupal's coding standards (the array formatting), but also so that you're able to translate the values of the array keys. You'll probably want to use
t()when presenting the value as well.#5
Is there a patch for D6?
#6
I have done some work here:
http://drupal.org/node/501060