5e263e09a1118f14427dd489e8df3ec1.png PSMList 0.4.0 PSM-040-016

Général

Ordre affichage : 15 Création : 09/05/2023 13h27
Index BL : 16 Modification : 19/06/2023 15h44
BL : PSM-040-016

Source : Aucune Soeurs : -

Dev

Fin dev :   D (Done) Ticket : -
Contrôle dev effectué : Fiche : -

C.Qualif. :   #000000
Activé : Icône FA : Par défaut

Contact : ARS - Arshellan Qualification : Optimisation
Répartition : - Module : Forms
Dev : ARS - Arshellan Sous module : -

Provenance : 0.4.0  New Constat : -

Début : S.25 Charge j. : -
Fin : S.25 Délai j. : -
Priorité : - Pokercard : -
Estimatif j. : -

Description : Prevent users from putting any letters in numid inputs, and if they still do it, sanitize the value

Texte Commit : -

Description client : Improved user experience on numid inputs in custom expansion forms. The formatting rules are auto-applied for you automatically.

Client

Fascicule : Ne pas communiquer :
Alerte Mailing :

PreP

Statut PreP :   OK - Validé Testeur : ARS - Arshellan

Discussion

ARS

Arshellan

lundi 19 juin 2023 à 15:26

make sure that in any custom stuff form there is this<br/><br/><br/> 'attr' => array(<br/> 'class' => 'numid_only_numeric',<br/> ),

ARS

Arshellan

lundi 19 juin 2023 à 15:42

create a new file and put this code in it<br/><br/><br/> $(document).ready(function() {<br/> $('.numid_only_numeric').on('input', function() {<br/> let sanitizedValue = $(this).val().replace(/[^0-9]/g, '');<br/> let truncatedValue = sanitizedValue.substring(0, 3); // Truncate to maximum three characters<br/> $(this).val(truncatedValue);<br/> });<br/> });<br/><br/>then import it in script tags in all custom forms where there is a numid