Neo Forms 1 is the first of a number of expected forms packages and extensions for NeoWebScript.
This package allows you to define forms that will automatically fill in the values of the form elements with the contents of an array, where the names of the fields are fetched from correspondingly named elements of an array. (and NeoWebScript is very good at getting arrays to and from disk, see commands.)
When there is no corresponding element, a reasonable default value is set instead. (Blank, in most cases.)
Begin emitting a form where fields defined using the Neo Forms 1 commands will have values taken from arrayName, and additional (including required) HTML parameters appear in htmlFormParams.
Example:
neo_form data {method=post action="record_message.html"}Begins emitting a form where elements will come from the array named
data
, the data will be sent as a post, and
the NeoWebScript webpage called up and executed as a result is
called record_message.html
.
Define Neo Forms 1 fields of input types text, hidden, or password.
Example:
neo_form_field text name "width=50"Define a text field named name that will receive its initial value from arrayName(name).
Define a number of radiobuttons. The shared field name, and array element name, is name, parms pass through to the web browser, and values is a list of the values to put into the radiobuttons.
If arrayName(name) exists and matches one of the passed values, the corresponding radiobutton will be selected.
Define a bunch of options that are usually displayed as a popup menu. Again values are a list, and again if arrayName(name) exists and matches one of the specified values, that value is selected automatically.
Creates a checkbox item and array element named name. Passed-through parameters are in parms.
Expects a boolean value, either 0 (deselected) or 1 (selected).
If the element doesn't exist, defaults to deselected (unchecked).
Creates a <textarea>
element named name in the form
you are creating.
Example:
neo_form_textarea body "rows=6 cols=60"Create a text area element named body that is six rows high and sixty columns wide.
Create a submit button. If text is specified, it overrides
the default, which is whatever one you get if you create
an <input type=submit>
.
Same as for neo_form_submit, except clears the fields and shows the default reset value.
Ends the form currently being emitted by issuing a </form>
.