Is there a way to have text fields on a form automatically convert to all uppercase once a user exits the field, saving to the database in all caps?
Thanks!
Rick
Thanks!
Rick
Hi Rick,
This is simple to do after the form submits. Is that OK or do you need to do it in the browser?
For the after submit version
Bob
This is simple to do after the form submits. Is that OK or do you need to do it in the browser?
For the after submit version
<?php
$elements = array(
'input_name_a',
'input_name_b',
. . .
);
foreach ( $elements as $e ) {
$form->data[$e] = strtoupper($form->data[$e]);
}
?>
Bob
No, I don't need it in the browser at all. Just in the table. So will this code work for all fields on the form, or do I somehow have to add lines for each text field?
This topic is locked and no more replies can be posted.