InterWorx’s form system is the ideal means to collect data from user input, and is composed of several parts:

Forms
Much like controllers, forms are container elements that hold the various input objects that comprise a submittable form.

Inputs
Inputs come in many varieties, and can represent nearly any sort of user-provided data. Basic types include strings, integers, and selects. They can also be extended to handle specific formats to suit any need.

Validators
Validators are objects that can be assigned to inputs and are useful for validating input coming in via forms.

DatasourcesDatasources are objects that define what values are invalid for a given input (for example, with a select, checkbox, or radio input).

It is not required that the InterWorx Form System be used by custom plugins, but doing so includes some nice benefits, such as built-in round-trip ajax validation, automatic form html and javascript management, etc.

Payloads are an integral part of how information is displayed within InterWorx. Payloads allow developers to easily present and update data dynamically in a wide variety of contexts. To accomplish this, each payload typically includes several key components:

Payload Factory ClassesThe primary payload object, payload factory classes allow the various types of payloads ( Payload_Factory_NW_Dns or Payload_Factory_SW_Users, for example) to be instantiated as needed.

Payload Data FormatsThe data to be displayed is called the Payload Data, and is a numerically-indexed array of similarly defined stdClass objects.

Payload Formatting
Payload Formatters allow various aspects of a payload — columns, cells, headers — to be formatted by a configurable set of rules. These are only relevant in the web interface.

Payload Actions
By providing an array of controller actions and various format parameters, payloads can optionally execute actions on the displayed data.

For certain user operations, it is advantageous to execute an action as that user (instead of the default iworx user). In such a case the ~iworx/bin/runasuser.pex can be called with parameters for the user’s Unix name and the script or program to be called.