Joomla 5 Mitteilung

Wir freuen uns mitteilen zu können, dass seit dem 29. Januar 2024 alle unsere Joomla Erweiterungen mit Joomla 5 kompatible sind.

Für alle die gerade noch von Joomla 3 auf 4 aktualisieren: Anleitungen für die Joomla 4 Migration gibt es hier:

Es gibt nun auch eine eigenständige Dokumentation für Visforms für Joomla 4 und für Visforms auf Joomla 5

Forum

Visforms Subscription Inhaber können in unserem Forum Fragen stellen. Bitte mit dem entsprechenden Benutzer anmelden.
Jeder kann lesend auf das Forum zugreifen.

Bitte stellen Sie nur 1 Frage pro Thema.

Wichtig Angaben für fast jede Frage:
V1: Welche Visforms-Version läuft?
V2: Welche Joomla-Version läuft?
V3: Welche PHP-Version läuft?

Aufgrund von Feiertagen und Urlaub ist bei Anfragen im Forum in der Zeit vom 20. Dezember 2024 bis zum 8.Januar 2025 mit verlängerten Antwortzeiten zu rechnen.

issue with numeric field

Mehr
9 Jahre 1 Monat her #2150 von meysam66
issue with numeric field wurde erstellt von meysam66
hello
first of all thanks for your awesome extension. its very rare to find an extension with such functionality.

i had a problem with number field, i wanted a field to get my client telephone or mobile number, so my choice was "number" for the field type also it was better that user couldn't type alphabetic text in that field.

but when i lunched to my form, i saw an increment up and down button left side of the input field, it was unwanted to me so i tried to captured the css class related to that to set it's display to none through firebug but i found nothing.
then i tried to test changing the field type by firebug, i found a field type called "tel" that was my desired one, so i came back to change the field type but i realized there is no such field type at visform field list.

phone type or just a numeric simple field is very common, i am confused

do you have any suggestion to help me make it right?

Mehr
9 Jahre 1 Monat her #2152 von Administrator AV
Administrator AV antwortete auf issue with numeric field
Hi,

the number field type is really meant to take numbers (integers or decimals). Numbers cannot have a leading zero and therefore are never suited to take a phone number. Providing functionality to increment the number is a browser implementation and not a Visforms implementation. As far as i know, it is not possible to change this with css (It the same with the design of upload field for example).

You are correct, that the amount of different field types supported by html5 is increasing constantly and the browser support for those field types becomes more and more common. This was different in the past and that is, why those modern field types are not yet available in Visforms. But even if there were a field type "tel" I would not know which validation rules I have to implement because phone number format is very different throughout the world. Nevertheless I will set your request to my feature wish list and check this point again. But this may take its time.

Having said this, Visforms provides a solution for your problem. There is an option to add a custom validation to the field type "text".
If you want to make sure, that only numbers are typed in use the following regular expression with this option.
Code:
^\d*$
If you want to make sure, that the user can only input a given amount of numbers (12 in this example) use the following regular expression with this option. Adapt the number in the curly brackets to the amount of characters of a phone number in your country.
Code:
^\d{12}$

You can allow a range for the amount of numbers required, too. For example if the length of a phone number can vary between ten and twelve use the following regular expression.
Code:
^\d{10,12}$

Or you can search on Google for a regular expression suited for the phone number format in your country.

Good luck,
Aicha

:idea: I recommend you the new and up-to-date documentation for Joomla 4:
docs.joomla-5.visforms.vi-solutions.de/en/docs/
Most of this also applies retrospectively to Joomla 3.
Please only ask 1 question per topic :-).

:idea: Ich empfehle Dir die neue und aktuelle Dokumentation für Joomla 4:
docs.joomla-5.visforms.vi-solutions.de/docs/
Das meiste gilt rückwirkend auch für Joomla 3.
Bitte immer nur 1 Frage pro Thema stellen :-).
Folgende Benutzer bedankten sich: meysam66

Mehr
9 Jahre 1 Monat her #2156 von meysam66
meysam66 antwortete auf issue with numeric field
thank you "administrator" for your solution, i have used it, i think it's ok for now.

and you are right about differences of telephone number formats in various location,
i have seen a kind of field type with the name "phone" in other form or contact extensions which was a simple input field and accepting only numbers 0 to 9 with no specific length limit.

and i saw another field type in one form, which was taking only numbers (0 to 9) and dash (-) character for separating any area codes.

thanks again for your reply.

Mehr
9 Jahre 1 Monat her - 9 Jahre 1 Monat her #2157 von Administrator AV
Administrator AV antwortete auf issue with numeric field
Hi,

you're welcome.

Thanks for the additional information. So actually, you can achieve all this with Visforms "out of the box" and actually you are even more flexible, because you can decide yourself which custom validation you want to apply. (And now it is documentated so that everybody who searches the forum can find the solution :) )

Please don't forget to add a custom error message to the field (in field configuration) in order to let your users know which format you require (if validation fails).

Regards,
Aicha

:idea: I recommend you the new and up-to-date documentation for Joomla 4:
docs.joomla-5.visforms.vi-solutions.de/en/docs/
Most of this also applies retrospectively to Joomla 3.
Please only ask 1 question per topic :-).

:idea: Ich empfehle Dir die neue und aktuelle Dokumentation für Joomla 4:
docs.joomla-5.visforms.vi-solutions.de/docs/
Das meiste gilt rückwirkend auch für Joomla 3.
Bitte immer nur 1 Frage pro Thema stellen :-).
Letzte Änderung: 9 Jahre 1 Monat her von Administrator AV.
Folgende Benutzer bedankten sich: meysam66

Moderatoren: Administrator AVAdministrator IV
Powered by Kunena Forum