sqlaction
Tag
Attribute List:
This tag just indicates where the "action buttons" should go. There can
be only one sqlaction
button of each type
in a template.
Type of tag: Self-closing
Attributes
type
Required: Yes
Values: See below
Indicates which type of button this tag should represent.
add = the "Add New Entry"
button, for "add" templates only.
edit = the "Update"
button for "edit" templates.
delete = the "Delete"
button for "edit" templates.
previous = if there are
previous values to the data the user is
viewing, the user can click this to view them. Ignored in "add"
templates.
next = ditto for if there
are further values.
search = the Search
button, assuming you have at least one sqlfield
with isSearch being
true.
reset = Resets the
template to start again at page 0 with no searches set.
action = This will be treated as edit for edit templates, and add
for add templates. Useful when repeating an sqlrow for two separate
templates; see Referencing Tags.
csv = Save the current view as a CSV file.
csv-all: Save the entire dataset as a CSV
file (ignoring limit and current page, but keeping search and sort
information).
Note:
For edit
templates, there are really two ways of going about things. You can put
one or both action buttons inside
the sqlrow
tag; this will cause them to be displayed for each row, and therefore
each row will be a separate form. On the other hand, you can place
the edit button outside the sqlrow
tag, which will allow the user to edit all fields at once. Mixing and
matching these two types is a bad idea and won't work. If there's an edit button
outside the
sqlrow
tag, all
other edit
and delete
buttons will be ignored.
image
Required: No
Values: URL of an image
The given image will be displayed rather than a button.
style
Required: No
Values: CSS style
Works like any other style
attribute.
class
Required: No
Values: CSS class
Works like any other class
attribute.
value
Required: No
Values: Any string
Changes the text display of the button.
onAction
Required: No
Values: Any URL
This will redirect the user to the given URL after the action is taken.
URLs can be relative or absolute. Note that you cannot use Ajax
functionality for this sqlaction button if onAction is defined.