WEBFIELD

Top  Previous  Next

Syntax

 

webfield "name","selector"[,attributes]

 

Description

 

Used by the SDSI Web Extension as part of an integration rule set.  This command creates an input field whose value is derived from the selector, which is a jQuery/CSS selector that identifies a particular element in the web page or frame.  If multiple elements are selected, the first one is used.  The value is either the element's "value" attribute, if present, or its innerText property.

 

The name value is used as a label for the field, and as cgi.field_name$ when the form is submitted.  Spaces are converted to underscores in the cgi field name (i.e. cgi.field_doc_id$).

 

To add addition attributes to the input field, specify them as HTML attribute tags after the selector option.  Attributes should be space-separated, as they are added directly to the <input> tag.

 

Examples

 

This creates a web field whose value is that of an <input name="invoiceno"> field that is a descendent of a form whose ID is "custinv".  The field is styled for width, and is readonly.

 

webfield "Doc ID", "form#custinv input[name=invoiceno]", style="width:10em;" readonly