Content

Page tree


Description

The SnomIPPhoneInput (or IPPhoneInput) tag displays an input field. The entered value can be put anywhere into the URL for the next XML file to process by a freely definable token. In combination with URI fragment commands the value can be used to set settings or variables.

See examples for this tag below.



Valid Attributes

SnomIPPhoneInput can contain any of the attributes from the Main Attributes list



Valid Subtags

SnomIPPhoneInput can contain any of the subtags from the Main Subtags list.

In addition, it contains the following subtags:

URL

The URL that is fetched after the input has been finished with the OK (check-mark) button. All occurrences of the string defined in the InputToken element will be replaced by the entered value.

Valid Attributes:

  • sel: Preselect this entry
  • input_required: Make it mandatory for the user to enter an input. Valid values: yes, no

Valid Subtags:

  • Name: The displayed text for the entry
  • Telephone: The number dialed, when the entry is selected

Example
<Url>http://example.com/example.php?myvar=__X__</Url>[...] <InputToken>__X__</InputToken>
<Url>http://example.com/example.php#var:foo=$$$BAR$$$</Url>[...]<InputToken>$$$BAR$$$</InputToken>

InputItem

Required element to determine the input rule.

Valid Subtags:

  • Conditional Elements: see Conditional blocks
  • DisplayName: Header of the input field. Currently this is displayed in the title, so the Title element has no effect for SnomIPPhoneInput
  • DefaultValue: The default value that will be pre-filled into the input field.
    • The default value can bypass the input flag. This mean the phone can still send a character even if the character can't be entered through phone keys. As an example, text as default value can still be send even if a number input flag is chosen.
    • The default value will be directly replaced with the '*' character when using the password and numeric password input flags.
  • InputToken: Defines a token, that will be replaced in the URL by the entered value
  • InputMask: limiting the input position and input mode. 9, a, A characters will act as mask with correspondent input mode (9 as number input mode, a as lower-case input mode and A as upper-case input mode).  See example here
  • Range: defines the range allowed for the input value. For example "<Range>2-5</Range>" will only allow user to input numbers from 2 to 5. If the user enters a value outside the range, after pressing OK an error will be displayed.
  • InputFlags: Specifies the type of input field. If no input flag is defined the normal text input flag will be chosen. Valid values:

    Input flagInput flag descriptionOption to change input modeDefault input mode
    anormal textAll modes are selectable and workinglowercase
    ttelephone numberAll modes are selectable but not workingnumber
    nnumberno mode availablenumber
    enumber with textAll modes are selectable and workingnumber
    uuppercase textnumber mode is show but can't be chosenuppercase
    llowercase textuppercase mode is show but can't be chosenlowercase
    ppasswordAll modes are selectable and workinglowercase
    pnnumeric passwordAll modes are selectable and workingnumber
  • InputModeFixed: locks the input mode and does not allow users to change it. You can use this flag by adding it to your <InputItem> like this:

    <InputModeFixed>1</InputModeFixed>
  • ExtraText: text to display on the same line with the input field

Notes:

  • The phone can differentiate between two characters input in the time between the release of the first key and press of the second key.
  • You can customize the characters that result when pressing a number key by changing the following settings: chars in lower case and chars in upper case. The defined character(s) must be supported by the phone PUI language.
  • Avoid to input the following sequences:

    • warm start: **##
    • cold start: **#*
    • reset values: * volume+ * volume- # (on snom 3xx series only)



Examples

Simple example

XML code:

<?xml version="1.0" encoding="utf-8"?>
<SnomIPPhoneInput>
	<Url>http://example.com/example.php?myvar=__X__</Url>
	<InputItem>
    	<DisplayName>Title</DisplayName>
    	<InputToken>__X__</InputToken>
    	<DefaultValue>Input</DefaultValue>
    	<InputFlags>a</InputFlags>
	</InputItem>
</SnomIPPhoneInput>


Result:

InputMask

XML code:

<?xml version="1.0" encoding="UTF-8"?>
<SnomIPPhoneInput>
	<Url>snom://mb_nop#action_ifc:date_time=set,time=__Y__</Url>
	<InputItem>
    		<DisplayName>Time:$(time)</DisplayName>
    		<InputToken>__Y__</InputToken>
    		<InputMask>99:99</InputMask>
    		<InputFlags>a</InputFlags>
    		<DefaultValue>00:00</DefaultValue>
	</InputItem>
</SnomIPPhoneInput>


Result: