Link Search Menu Expand Document

input

Tag is an essential part of a form, a Couch equivalent of <input> in HTML.

Please see Core Concepts - Form for an in-depth discussion about this tag.

Parameters

Apart from the parameters listed below, any parameters given to this tag will be passed on unchanged to the HTML tag generated by it.

  • name
  • type
  • id
  • required
  • validator
  • validator_msg
  • separator
  • val_separator
  • opt_values
  • opt_selected
  • width
  • height
  • style
  • format
  • reload_text

name

Name of the input. This parameter is mandatory.

type

Type of the input. Valid values are -

  • text
  • password
  • submit
  • hidden
  • textarea
  • radio
  • checkbox
  • dropdown
  • captcha

Please see Core Concepts - Form for details about these types.

id

Id of the input.

required

Set this to ‘1’ to make this field mandatory.

validator

The input tag shares this parameter with the editable tag. Please see the validators section of editable tag for a list of all the validators that can be used.

validator_msg

The input tag shares this parameter with the editable tag. Please see the validators section of editable tag for a description of this parameter.

separator

val_separator

opt_values

opt_selected

The separator, val_separator, opt_values and opt_selected parameters are valid for only radio, checkbox and dropdown input types.
The input tag shares these parameters with the editable tag. Please see the parameters of radio, checkbox and dropdown types of editable regions for details of these.

width

Width in pixels e.g. width=’200’.

height

Height in pixels e.g. height=’450’

style

Inline CSS styling.

format

Parameter is for the captcha type and expects a text string that can consist of 4 different characters - ‘t’, ‘i’, ‘r’ and ‘-‘, where t = textbox, i = image, r = reload text, - = HTML break

reload_text

The format and reload_text parameters pertain exclusively to input of captcha type. Please see Core Concepts - Form where the captcha type of input, along with its parameters, is described in detail.

Example

<cms:input type="text" size="10" maxlength="40" name="name" />

<cms:input type="password" size="10" maxlength="10" name="password" />

<cms:input type="submit" name="submit" value="Send" />

<cms:input type="hidden" name="max_val" value="100" />

<cms:input type='textarea' rows="5" cols="20" wrap="physical" name="comments">
  Enter Comments Here
</cms:input>

<cms:input type="radio" name="size" opt_values="Small=small | Medium=medium | Large=large" />

<cms:input type="checkbox" name="toon" opt_values="Goofy | Donald | Bugs Bunny=Bugs | Scooby Doo=Scoob" />

<cms:input type="dropdown" name="degree" opt_values="Choose One | High School Degree | Some College | Bachelor's Degree | Doctorate" />

<cms:input type='captcha' name='my-captcha' format='i-r-t' />

In a fieldset

<cms:fieldset>
   <cms:input type="text" size="10" maxlength="40" name="name" required='1' />
   <cms:input type="password" size="10" maxlength="10" name="password" />
</cms:fieldset>

Variables

This tag does not set any variables of its own.