Developer_release_1.4.0

Struct app.spec_backoffice_forms

Forms used in the Application.

One of the variations of the user input is through the web-forms. The Application Developer describes the forms in the Application script specification. Scheduler sends the forms data to the Backoffice. The Backoffice shows the forms to the user. The user can fill any of the forms and submit them. After submitting the form, the data is sent back to the Application script API.

The forms table is an array of key-value tables which are form specifications.

Form specification fields:

  1. purpose — (optional) the purpose of the form; the purpose can be one of the following:
    1. general (default) — no special processing.
      Companion fields:
      1. submit_event — (required) name of the D-Bus event name, that will be emitted on form submission. The name should be prefixed with the Application id.
    2. schema — (required) absolute or relative (to the Application script location) path to a json schema for the form.
    Example:
     return
     {
       {
         schema = 'backoffice/forms/registration.json';
         submit_event = 'com.example.acme.webscript.api.RegistrationSubmit'
       }, {
         schema = '../json/feedback.json';
         submit_event = 'com.example.acme.webscript.api.FeedbackSubmit'
       }, {
         purpose = 'general';
         schema = '/etc/schema/checkout.json',
         submit_event = 'com.example.acme.webscript.api.CheckoutSubmit'
       }
     }



generated by LDoc 1.4.6 Last updated 1980-01-01 00:00:00