WBF_field - sending field values as request
Syntax example (GET method)
Syntax example (POST method)
type="hidden" name="WBF_ISBN" value="0201694085">
Any text and/or numeric value, including WhizBase tags
and functions, that will be accepted by DBField (e.g. do not send text to a
numeric or date/time field).
Form fields with name starting with WBF_ are used
to carry a value for specific database field. The name of the field is specified
after WBF_ prefix and it has to be exactly the same as in the
database. The action that will be performed with received value depends upon
value of the WB_Command and (for some WB_Command
values) WB_UID. Basically the most common case is that
this value will be used to filter records (WB_Command values Q, D, P, L). In other cases the value will be
stored in database field (WB_Command values A and U). The exception to this rule is if field name
following the WBF_ prefix is the same as field name defined in WB_UID variable
and WB_Command value is U. In this case received value for that field will be
used to identify the record to be updated and all other WBF_ values will be
stored to proper database fields.
The best way to illustrate usage of these fields is example.
Title: <input type="text" name="WBF_Title"
Year published: <input type="text" name="WBF_Year
<input type="radio" value="And" checked
name="WB_AndOr">AND <input type="radio" name="WB_AndOr"
<input type="submit" value="Go"
Run the file with this example code and experiment with various values for
"Title" and "Year published" fields, and try changing AND/OR form
There are few rules:
- To let user search through specific field just send form field named
exactly as database field with prefix WBF_ (don't forget the underscore) to a
WBSp file with WB_Command=Q
- Depending on WB_AndOr field WBSP engine will return records that meet all
the conditions (AND) or any of the conditions (OR) (WB_Command values Q, D, P
- If user leaves any of the fields empty, those fields will be ignored (all
- If WB_Command value is Q, D, P or L:
- All SQL pattern rules are supported
- In Numeric and Date fields user can enter characters for comparison at
the beginning of entered value (> greater than, < less then, >=
greater or equal,<= less or equal and <> not equal)
<input type="hidden" name="WBF_Year published"
<input type="hidden" name=
Try typing comparison characters
as a part of form field in example above
- If WB_Command value is U
- To update database field to NULL value send exactly the same value in
WBF_field and WB_Null variables (text and memo
field types only)
- To store new value that is related to old one use update prefixes
These variables can not be part of WBSP file - they
can only be sent by client as a part of http (or https) request using either
POST or GET method.