Closed (fixed)
Project:
Phone
Version:
7.x-1.x-dev
Component:
User interface
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
20 Oct 2011 at 20:25 UTC
Updated:
16 Mar 2012 at 20:50 UTC
Jump to comment: Most recent file
Comments
Comment #1
Ari Gold commentedI have the same problem. I'm using US & Canada phone number...
Comment #2
jens.de.geit commentedsame over here with Belgium is there a patch for this available?
Comment #3
flightrisk commentedSame here, I was just coming to post the issue and see you already started it. I've been using the module since October but just saw that this wasn't working and help wasn't displaying. There is a fix for the help issue in a patch.
Comment #4
flightrisk commentedOk, I looked at the code and fixed it myself. Give it a test. I don't have time to create a patch, sorry. Perhaps someone else can and then submit it. It is a 1 line change. Look in the phone.module file at or near line 227 for the form_field_widget_form function. You need to add a line. The line with the '+' in front is what you need to add:
function phone_field_widget_form(&$form, &$form_state, $field, $instance, $langcode, $items, $delta, $element) {
$element['value'] = array(
'#type' => 'textfield',
'#title' => $element['#title'],
'#description' => $element['#description'],
'#default_value' => isset($items[$delta]['value']) ? $items[$delta]['value'] : '',
+ '#required' => $element['#required'],
'#size' => 17,
'#maxlength' => (
Note that if you don't have the '#description...' line in there, add that too to fix the popup help instructions for the field which also weren't working in my version.
Comment #5
jantoine commentedA patch including the fix in #4 is attached.
Comment #6
cweagansCommitted. Thanks!
Comment #7
flightrisk commentedExcellent everybody, teamwork! ;) If nobody finds an issue, guess we can close this one