Actions

Difference between revisions of "Developer Area/Pieforms"

From Mahara Wiki

< Developer Area
m (Created page with "== Form basics == '''Each form needs to contain:''' * '''name''' - And that name must be valid (validity test: could you give a PHP function the name?) Each form can contain: …")
 
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
== Form basics ==
 
== Form basics ==
  
 +
[[File:Pieform-structure-chart.png|thumb|Components of a Pieform form]]
  
 
'''Each form needs to contain:'''
 
'''Each form needs to contain:'''
Line 10: Line 11:
 
* elements - An array of form elements to display (see Elements)
 
* elements - An array of form elements to display (see Elements)
  
... more info to come soon
+
The components and attributes that can be used in making a form with Pieforms
 +
 
 +
The form consists of a main form array containing the metadata for the form
 +
It then has an array of one or more elements that make up the form
 +
 
 +
[[File:Pieform-form-action-sequence.png|thumb|Process of a Pieform form]]
 +
 
 +
To set up a form and to display it via a template so that one can interact with the form read the [[Developer_Area/Core_Subsystems/Form_API_(Pieforms)|Form API]]

Latest revision as of 15:21, 18 September 2020

Form basics

Components of a Pieform form

Each form needs to contain:

  • name - And that name must be valid (validity test: could you give a PHP function the name?)

Each form can contain:

  • method - Can be empty or 'post' as each form will pass the session key and we can't do that via 'get'
  • action - Can be empty (defaults to self) or page url
  • elements - An array of form elements to display (see Elements)

The components and attributes that can be used in making a form with Pieforms

The form consists of a main form array containing the metadata for the form It then has an array of one or more elements that make up the form

Process of a Pieform form

To set up a form and to display it via a template so that one can interact with the form read the Form API