Presto Content Management System
Form Data Structure Specification

<- ->

Documentation > Presto Developer's Manual > Under The Hood > The Form Interface

The form data structure is entirely set up by the <FORM_STRUCTURE> tag.  [] indicates item doesn't require a value.

Read-only fields retrieved from Presto form record:

HTML form tag related fields:

[name] Plain text name of form, appears as form title, and presto name;language appropriate.
[help] Single HTML help file for form contents, language appropriate.
[tag_name] Form tag's name parameter.
[target] Form tag's target parameter.
[regular_names] 1= use field's field_name for form field (if any), instead of Presto field_id coding for field names). Default is to use Presto field_id.
[javascript] This custom javascript is included at bottom of form, and so is executed after form is drawn.  Particular fields can have event-driven functions that call upon this code.

Versioning information (these are standard Presto item version fields):

[version] Form version. No format has been implemented.
[created]
[creator_id]
[updated]
[updator_id]
[publish]
[archive]
[notes]  (100 characters)

Data logging-related fields:

[form_page_type] Presto database table, if any, that this form primarily operates on. None by default.
[log_type] none(default)/tab delimited text/XML
[log_to_db] Yes= store data in Presto's Form_Log_Text or Form_Log_XML tables.
[log_to_file] Name of file to log to. It will be placed in /data subfolder.
 [log_incremental]  Log only changes on updates? Creates are logged entirely.

Fields added on by form_structure tag (they involve processing status or processing directives):

valid Flag indicating whether form data as a whole is valid.  Default value is 1.  This is set by <form_validate> tag.  Each field is examined for validity.  If a field fails test, field valid= 0 and form's valid status becomes 0 too.
error Flag calculated by <form_process>.  1=processing of data has generated an error.  This involves database insert or update attempts or record_id & group_id correctness; it isn't directly affected by form field validity.
processed Flag calculated by <form_process>.  1= processed, 0=not processed (because of some kind of error perhaps).  If form_structure.error, then processed = 0.  Processed flag is one way to knowthat <form_process> tag was run, and was run successfully.
[completion_ID] Page to advance to on successful completion of form.
[pre_process] Script template to run before processing.
[post_process] Script template to run after processing.

Fields subject to change via attribute or database field value only:

[email_ids] Ids of emails to send form contents to in <form_process...>.  Incomming form parameter for this is not allowed since email_ids aren't checked for security/management rights. 

Fields subject to change via attribute or form parameter, but not by form's database form table record:

mode Mode or state of form:create_form/update_form/create/update/view
group_id group_id associated with form's content data.
record_id record_id of form's content data.
[parent_id] ID of parent group to create new items under.  Pertinent to forms in "create_form" and "create" modes. Parent ID must be checked for admin rights before create is performed.
language

NULL,1-X. Language that form's field names and textual data are in/will be in). (FUTURE:may reference more than one language). Individual text field input tag names each have pertinent #language# appended to their name. This is a function of:

  • incomming form's language parameter form.presto_language, if any.
  • form_structure tags language parameter, if any
  • otherwise default to user's language.

Fields subject to change via attribute or form parameter, or form's db record data:

form_id Presto ID of form. Can be provided directly as attribute, or derived from incomming form.form_id, or supplied page_type or group_id attribute.
action Web url to submit form to.

Multilingual functionality: If a form is requested for display in multiple languages simultaniously, these fields are available: (where X is one form's language ids).

[helpX] Language variant of above.
[nameX] Language variant of above. UNUSED: error_html: html text indicating fields and their error info.

<- ->

Valid XHTML 1.0!