These are pages which accept a GET request and return a prerendered HTML form. Forms are rendered server-side so that they can be customized for a particular user's context. For example, the "user" form will render differently if we are creating, versus updating, a user's information. All form api pages are stored in the forms
directory. Success, error, and warning messages are sent to the alert stream, and can be accessed via api/user_alerts.php
.
form_user.php
Loads a customized form/panel for creating, updating, or displaying a user.
Login required: no
Securable page: yes
GET request
Variable name | Description |
box_id | The desired id of the div that will contain the form. |
render_mode | Render the form as a popup (modal) window, or in a flat panel. Set to modal or panel. |
[user_id] | If specified, will load the relevant data for the user into the form. Used for viewing/updating a user. |
[fields] | A list of fields to render. If not specified, the following fields will be rendered by default:
|
[buttons] | A list of buttons to render. If not specified, the following fields will be rendered by default:
|
GET response
A JSON object containing the following fields:
Variable name | Description |
data | The fully rendered HTML for the form/panel. |
Possible alerts generated
SQL_ERROR
: Database error.