wizard.xml

Wizard files can be used for multi step data entry and to collect data before an action is required, here's a sample.

<wizard>
  <action id="preview_planning" file="../review/reviewlib.php" function="mgrListEmployeesInPlanning"/>
  <action id="preview_self_review" file="../review/reviewlib.php" function="mgrListEmployeesInSelfReview"/>
  <action id="start_self_review" file="../review/reviewlib.php" function="mgrStartSelfReview"/>
  <page id="default">
    <text>
      Dear Manager, you will launch the Self-review phase for your
      team using the below function.
    </text>

    <text>
      Below is the list of your team members who will get the Self-review e-mail.
    </text>
    <output id="list_avail" action="preview_planning"/>
    <field id="send_email" type="checkbox" label="Send email"/>
    <field id="email_text" type="textarea" label="Email content"
           size="80" height="8">Dear employee,

This e-mail is the official launch of our Focal Review process this year.

Your Manager
</field>
    <button id="start" label="Start self review" success="done" failure="failed" action="start_self_review"/>
  </page>

  <page id="done">
    <text>These people who report to you can now do their self review.</text>
    <output id="list_done" action="preview_self_review"/>
  </page>

  <page id="failed">
    <text>
      The starting of the review failed!
    </text>
  </page>
</wizard>

action defines an action that can be done later, with filename and function name it maps to. The function will always be called with three arguments that describes the content in the wizard when called.

The default page is the starting page, calling the preview_planning will list people in a certain stage, and simply inserting the output in that section. Pressing the button will call another action that will return success or failure that maps to two other pages that will be displayed. Neither of those pages has any further information available, so after it hits done or failed, the form is done.

<row>

This can be used to show fields for a record and allow the user to edit them. It will show the fields that are available

<row> attributes

id - the ID of the row.

table - the table the row data comes from and should be added or updated to.

keystorage - what page that keys should be stored in.

method - can be update, view or insert. Update for editable values to update, view for a read only view and insert to add new data to the field.

hidefields - List of comma separated fields that should be hidden.

requiredfields - fields that are required.

values - default values for fields, use field=value,field2=value2 syntax.