Ask and answer questions about WebRatio, WebML and BPMN

How uppercase the fields in entry unit after changed focus? It's possible writing directly in uppercase?

asked 20 Dec '11, 05:07

luisa.iorio's gravatar image

luisa.iorio
01
accept rate: 0%


Hi Luisa,

if you want to change the case of an input Field you can create or modify the Field Template of the unit. In this case you can prepare a Javascript function which takes in input the value of the current field and returns the same value in uppercase. This function can be called with the onkeyup event.

For example:

<html:text [%onkeyPressed()%] [% if (maxLength != "") { %]maxlength="[%= maxLength %]"[% } %] size="[%= inputSize %]" styleId="[%= htmlId %]" styleClass="[%=styleClass%]" property="[%=fieldProp%]" readonly="[%= readOnly%]"/>

You can set the onkeyup event and the this.value=this.value.toUpperCase(); function:

<html:text [%onkeyPressed()%] [% if (maxLength != "") { %]maxlength="[%= maxLength %]"[% } %] size="[%= inputSize %]" styleId="[%= htmlId %]" styleClass="[%=styleClass%]" property="[%=fieldProp%]" readonly="[%= readOnly%]" onkeyup="this.value=this.value.toUpperCase();"/>
link

answered 21 Dec '11, 04:46

albertomolinaroli's gravatar image

albertomolin...
63424
accept rate: 62%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×1

Asked: 20 Dec '11, 05:07

Seen: 165 times

Last updated: 21 Dec '11, 04:46

Related questions

©2001-2011 Web Models s.r.l. All rights reserved