To save data clean ERPAL should formatting the input field of phone and fax. For example:

Some employees write phone numbers in different way.

012345678
01234/5678
01234/56 78
+4912345678

etc. It is more clean to control that with a jQuery script.

CommentFileSizeAuthor
#6 input-type-number.png43.94 KBmeego
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

manuelBS’s picture

Right you are! Do you know a script that can do it? Or we can convert the numbers in the backend? But the philosophy of drupal (and input filters) is to save values as they are entered and only format the output. Any other opinions on that?

alexander.sibert’s picture

Hmm, you have right. To modify such fields is not good but to include a client side jQuery JavaScript (i saw plugins for such situations).

johnv’s picture

Wouldn't support of a Phone field be better?

meego’s picture

Integrate HTML5-ness to incorporate the markup.
Telephone Input Type: http://www.whatwg.org/specs/web-apps/current-work/multipage/states-of-th...
It's important for on-screen keyboards.

manuelBS’s picture

As the phone field is still in dev mode, we decided not to use it for the first release. We will check how to integrate HTML5-ness to support on screen keybords, thanks for the link

meego’s picture

FileSize
43.94 KB

Sorry, my comment was not clear. - It's not just about "phone field", but "input type": http://www.w3.org/TR/html-markup/input.number.html
This is quite a while feature of the HTML5.

See for example "input type": "NUMBERS AS SPINBOXES"

<input type="number"
       min="0"
       max="10"
       step="2"
       value="6">



"Reduce" the keyboard to the optimum:
input-type-number
Source: http://diveintohtml5.info/forms.html

wusel’s picture

During a new installation of version "7.x-2.x-dev" I got an error message while installing "Contact information":
"Please enter only numbers as phone number.".

My typed phone number was like "+49 0000 0000-00".

As shown on http://de.wikipedia.org/wiki/Rufnummer#Schreibweisen or http://en.wikipedia.org/wiki/Local_conventions_for_writing_telephone_num... the phone number should be edited like "+49 30 12345-67".

It should be possible to put in "+" and "-" and space, too.

Wusel

wusel’s picture

Yersterday, because of http://drupal.org/node/2049077 , I made a fresh install of version 7.x-2.0-alpha2+96-dev - Last updated: July 24, 2013 - 19:07 of http://ftp.drupal.org/files/projects/erpal-7.x-2.x-dev-core.zip. I had no problems on XAMPP 1.7.7 on windows 7 64-bit.

During the installation I have to type in the telephone number of my company.

On the install-screen there shoud be a help, how this field is formatted. My input was wrong. :-(

Thanks.

Wusel

andrisek’s picture

The Number Field for the fone numbers is something, we want to change in the future, so that we can add those numbers. A description about how the numers are now formated would be usefull. Going to have a look at it.

Elin Yordanov’s picture

I am using the 7.x-2.x version of the Phone module in a project. It is not production ready yet and not supported by the maintainers. However it does a good job formatting the numbers. I didn't face any big problems using it, though I needed to do some little tweaks.

andrisek’s picture

Issue summary: View changes
Status: Active » Needs review

Please take a look at the new fields of the beta. We changed the fields.

discipolo’s picture

there is no beta to look at yet