phone number char limited / admin to add new phone number

Bug #1498560 reported by Christian Loeper
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
queXS
Fix Released
Undecided
Alex

Bug Description

Hi Adam,

Operators are able to add a new phone number while setting an appointment.
I noticed that phone numbers characters is limited to 10 at the "add new phone number"-box, which is too little.
In addition admins, who edit appointments, are not able to add a new phone number - but they sould be.

Regards,
Christian

Related branches

Revision history for this message
Alex (ddrmoscow) wrote :

Hi Christian,

You're right, phone mumbers are limited to 10 by default. (note that only digits are allowed )
 It's done to prevent submitting faulty numbers, as we might use autodial or 'callto' function and wrong number will lead to faulty connection.
Besides, in most countries the number of digits for phone number is fixed.
Additionally, it depends on your FreePbx outbond trunk and outgoing line prefixes settings too.

If you need to change this value - you can do by editing file appointment.php (row 197, parameter "maxlength")

* New numbers by admin* - this feature was not implemented yet, as far as i know, but think you're right, it' might be useful sometimes.

Alex

Revision history for this message
Alex (ddrmoscow) wrote :

Hi Christian,

Forgotten to mention: check also pattern="[0-9]{10}" parameter -> change {10} to be = {your new maxlenght value} .

(Or you can simply remove both parameters, if you don't need them, lol)

Alex

Alex (ddrmoscow)
Changed in quexs:
status: New → Fix Committed
Revision history for this message
Alex (ddrmoscow) wrote :

Adam,

Maybe it'll good to set 'Number of digits in phone number' as a setting parameter and include it to the list of forecasted 'settings page'?

Alex

Revision history for this message
Christian Loeper (christianloeper) wrote :

Alex,
good point - still it could be set to 10 digits by default.

Adam,
thx for your help.

changing "maxlength" in appointment.php works, but pattern="[0-9] {new value}" requires exactly "new value" number of digits.
If i delete pattern="[0-9] {new value}" no form is accepted. In both cases an error tells me to keep default form.
Phonenumbers in germany have different lengths, so I need a range or no limits.

Christian

Revision history for this message
Alex (ddrmoscow) wrote :

Christian,

Didn't knew in germany you have different length.
 In this case , you might want to delete both parameters (maxlenght and pattern) to let it run with no limits.

Current ' pattern="[0-9]{10}" ' - means that input characters could be only numerical from 0 to 9 ant total number of charachers should be EXACTLY = 10.

In your case I'd suggest to set "maxlength"= maximal possible required phone lenght, and set 'pattern="[0-9]" ' ( without { }. = means it wount count charecters).

Alex

Revision history for this message
Christian Loeper (christianloeper) wrote :

Alex,

thanks for your response. Even after I deleted >pattern="[0 - 9] {20}"< completly, that error showed up.
It's already translated, in english it means "Keep the default form".

Revision history for this message
Alex (ddrmoscow) wrote :

Christian,

That's pretty strange.

Could you specify your quexs version ( revision) and range of values you need to input .

Alex

Revision history for this message
Alex (ddrmoscow) wrote :

Hi Christian,

Did you succeed with phone input filed parameters?

Alex

Revision history for this message
Christian Loeper (christianloeper) wrote :

Hi Alex,

yes i succeed but only by deleting 'pattern=[0-9]' and '{ }'.
Means that letters are allowed too. It's ok, but not the optimal solution.

I use Version 13.0.

Regards,
Chris

Revision history for this message
Alex (ddrmoscow) wrote :

Hi Christian,

Letters and symbols is definatelly not optimal.

I can suggest to set following parameters:
size="17" (15 for maximal numbers + 2 for arrows characters in some browsers, determines only visible field size),
 pattern="[0-9]{3,15} (only numbers, not less than 3 characters, not more than 15 characters)
maxlength - can be deleted (or set to 15 as in pattern expression.)

Additionally you can browse related information on "HTML5 input pattern" and "Regular Expression" to determine exact input behaviour .

Alex

Alex (ddrmoscow)
Changed in quexs:
assignee: nobody → Alex (ddrmoscow)
Adam Zammit (adamzammit)
Changed in quexs:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.