Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries. Thanks for all your past and future contributions.

Controlling character type in input fields

From Wiki
Jump to: navigation, search
Article Metadata
Code ExampleTested with
Devices(s): Nokia 5800, S60 3rd Edition FP2 devices
Platform(s): S60 5th Edition, S60 3rd Edition FP2
S60 5th Edition
S60 3rd Edition FP2
Keywords: WRT widget S60 browser text input
Created: (24 Oct 2008)
Last edited: hamishwillee (01 Aug 2012)


Wireless CSS property -wap-input-format can be used to control the characteristics of text input fields in S60 web browser and WRT widgets.

A good reference for the available formatting values is located here:

Widget / web page xHTML

<title>Text input</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style tyle=text/css>
input {background-color: #cc0000; font-weight: bold; font-size: 3em; color: white; width:100%;}
<form action="" method="" accept-charset="utf-8">
<p>Lower case letter or symbol:<br>
<input type="text" tabindex=1 style="-wap-input-format: '*a'"/>
<p>Upper case letter or symbol:<br>
<input type="text" tabindex=2 style="-wap-input-format: '*A'"/>
<p>Number or symbol:<br>
<input type="text" tabindex=3 style="-wap-input-format: '*n'"/>
<input type="text" tabindex=4 style="-wap-input-format: '*N'"/>
<p>Lower case letter, number or symbol:<br>
<input type="text" tabindex=5 style="-wap-input-format: '*x'"/>
<p>Upper case letter, number or symbol:<br>
<input type="text" tabindex=6 style="-wap-input-format: '*X'"/>
<p>Any, initially lowercase character<br>
<input type="text" tabindex=7 style="-wap-input-format: '*m'"/>
<p>Any, initially uppercase character<br>
<input type="text" tabindex=8 style="-wap-input-format: '*M'"/>
<p>2 numbers, 2 lowercase and 2 uppercase letters letters<br>
<input type="text" tabindex=9 style="-wap-input-format: 'NNaaAA'"/>

Test application and other attachments (optional)


Please rename the .zip file to .wgz before attempting to install it on the emulator or a real device.

This page was last modified on 1 August 2012, at 04:38.
42 page views in the last 30 days.