Forums

How to do Field format masks

clovismmbr 29 Mar, 2009
Hello, i am newbie on ChronoForms. I want to learn how to do field format masks.
ie. Telephone:[ (212) 555-6341 ] *Please fill only with numbers
I will set the field to accept only numbers.
the user fill the field with: 2125556341 and the data will be stored (212) 555-6341

How can I do this

Thank You All

Clovis
Max_admin 29 Mar, 2009
Hi Clovis,

you may try to run some PHP code to do the formatting during the onsubmit phase, example:

<?php
$mynewdata = JRequest::getVar('fieldname');//you need to do some PHP function to format the data here
JRequest::setVar('fieldname', $mynewdata);

?>


don;t try this with RC3 because it will not work!

Regards
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.