Skip over navigation

Roxen Interactive RXML Help

<vform></vform>

Creates a self-verifying form. You can use all standard HTML input widgets in this container as well.

Other tags that is related and useful are <default> and <roxen-automatic-charset-variable>.

<vform> <vinput name='mail' type='email'>&_.warning;</vinput> <input type='hidden' name='user' value='&form.userid;' /> <input type='submit' /> </vform> <then><redirect to='other_page.html' /></then> <else>No, this form is still not valid</else>

Attributes

hide-if-verified

Hides the form if it is verified

Defined in content

<clear/>

Resets all the widgets to their initial values.

Attributes

value
value=string

The text in the button.

If plugin vform-failed

If used with empty argument this will be true if the complete form is failed, otherwise only if the named field failed.

If plugin vform-verified

If used with empty arguemnt this will be true if the complete form so far is verified, otherwise only if the named field was successfully verified.

<reload/>

Reload the page without variable checking.

Attributes

value
value=string

The text on the button.

<verify-fail/>

If put in a vform tag, the vform will always fail.This is useful e.g. if you put the verify-fail tag in an if tag.

<verify-ok/>

If put in a vform tag, the vform will always be verified.This tag is probably only useful when the name-attribute inside the tag is set. If it is it will force that specific vform-variable as verified ok even if the <vinput>-tag that tested the variable failed.

Attributes

name
name=string

The name of the vform variable to force as verified ok.

<vinput></vinput>

Creates a self-verifying input widget.

Attributes

fail-if-failed
fail-if-failed=name

The verification of this variable will always fail if the verification of a named variable also failed.

ignore-if-false

Don't verify if the false flag i set.

ignore-if-failed
ignore-if-failed=name

Don't verify if the verification of a named variable failed.

ignore-if-gone

Don't verify if the variable is missing from the form scope. This is useful if the widget might be disabled. Be careful not to set this flag on all input fields since this would cause the form to verify upon first request to the page.

ignore-if-verified
ignore-if-verified=name

Don't verify if the verification of a named variable succeeded.

name
name=string
This attribute is required.

The name of the variable that should be set.

value
value=anything

The default value of this input widget.

scope
scope=name (vinput)

The name of the scope that is created in this tag.

trim

Trim the variable before verification.

type
type={int, float, email, date, text, string, password}
This attribute is required.

Set the type of the data that should be input, and hence what widget should be used and how the input should be verified.

date
date=string

If not specified toghether with the type="date" attribute the date will be verified as an ISO-date, i.e Y-M-D. If another date format is desired it should be specified with the date-attribute.

Examples:
date='%Y-%M-%D %h:%m' will verify a date formatted as '2040-11-08 2:46',
date='%Y w%W %e %h:%m %p %z' will verify '1913 w4 monday 2:14 pm CET'

These are the format characters:

%Y

absolute year

%y

dwim year (70-99 is 1970-1999, 0-69 is 2000-2069)

%M

month (number, name or short name) (needs %y)

%W

week (needs %y)

%D

date (needs %y, %m)

%d

short date (20000304, 000304)

%a

day (needs %y)

%e

weekday (needs %y, %w)

%h

hour (needs %d, %D or %W)

%m

minute (needs %h)

%s

second (needs %m)

%f

fraction of a second (needs %s)

%t

short time (205314, 2053)

%z

zone

%p

'am' or 'pm'

%n

empty string (to be put at the end of formats). You can also use '%*[....]' to skip some characters.

minlength
minlength=number

Verify that the variable has at least this many characters. Only available when using the type password, string or text.

maxlength
maxlength=number

Verify that the variable has at most this many characters. Only available when using the type password, string or text.

is
is=empty

Verify that the variable is empty. Pretty useless... Only available when using the type password, string or text.

glob
glob=pattern

Verify that the variable match a certain glob pattern. Only available when using the type password, string or text.

regexp
regexp=pattern

Verify that the variable match a certain regexp pattern. Only available when using the type password, string or text.

case
case={upper, lower}

Verify that the variable is all uppercased (or all lowercased). Only available when using the type password, string or text.

equal
equal=string

Verify that the variable is equal to a given string. Pretty useless... Only available when using the type password, string or text.

disable-domain-check

Only available when using the email type. When set the email domain will not be checked against a DNS to verify that it does exists.

mode
mode={before, after, complex}

Select how to treat the contents of the vinput container. Before puts the contents before the input tag, and after puts it after, in the event of failed verification. If complex, use one tag <verified> for what should be outputted in the event of successful verification tag <failed> for every other event.

<table> <tr><td>upper</td> <vinput name='a' case='upper' mode='complex'> <verified><td bgcolor='green'>&_.input:none;</td></verified> <failed><td bgcolor='red'>&_.input:none;</td></failed> </vinput></tr> <tr><td><input type='submit' /></td></tr> </table>

min
min=number

Check that the number is at least the given. Only available when using the type int or float.

max
max=number

Check that the number is not greater than the given. Only available when using the type int or float.

optional

Indicates that the variable should only be tested if it does contain something.

Defined in content

&_.input;

The input tag, in complex mode.

&_.warning;

May contain a explaination of why the test failed.

<failed></failed>

The content will only be shown if the variable failed to verify, in complex mode.

<verified></verified>

The content will only be shown if the variable was verfied, in complex mode.