force upper case

daffy 08 Sep, 2009
Is there a simple way in chronoforms to force uppercase on each entry as it is made?

I am used to Delphi where you can set a property of a textbox to 'upper' then whatever case the keyboard is set the characters come out in uppercase (or lower if set that way).
I can set them later to upper but it looks better if they are consistent on the form.
--
Dave
GreyHead 08 Sep, 2009
Hi Dave,

There's no automatic command in html but you can add a JavaScript snippet to the field to force it onChange="javascript:this.value=this.value.toUpperCase();"

Bob
daffy 09 Sep, 2009
Thanks Bob, that is very helpful I will use that when I can fit it in.
--
Dave
angie_iu 04 Mar, 2011
Is this correct?

<div class="form_item">
<div class="form_element cf_textbox">
<label class="cf_label" style="width: 150px;">Codice fiscale</label>
<input class="cf_inputbox required validate-alphanum" maxlength="150" size="30" title="Questo campo è obbligatorio" id="codice_fiscale" name="codice_fiscale" type="text" onChange="javascript:this.value=this.value.toUpperCase();"/>


</div>
<div class="cfclear"> </div>
</div>



If yes...why doesn't it work?
GreyHead 04 Mar, 2011
Hi angie_iu,

I think so, does it work?

Bob
angie_iu 04 Mar, 2011
Ok, now it works...but it has strange behaviour...
when I use tab to move from one field to another it works...but if I use mouse pad and text saved in the field it don't! anyway...no problem. it's ok like this.
GreyHead 04 Mar, 2011
Hi angie_iu,

That's quite normal, the onChange JavaScript event isn't triggered by the mouse :-(

Bob
This topic is locked and no more replies can be posted.