You are viewing an old version of this page. View the current version.
Compare with Current
View Page History
« Previous
Version 2
Next »
The Islandora Form Builder (XML_Forms modules) makes it possible for users to create, copy, and edit ingest forms, and to affiliate them with Content Models in the repository. The form definitions are defined in XML and stored in the Drupal Database.
The form builder can be reached by going to Islandora > Form Builder (admin/islandora/xmlform).
From the main interface, users can:
- Create a new form
- Import a form
- Copy a form
- Edit a form
- View a form
- Export a form as an XML Form Definition
- Delete a custom form
- Associate the form with a content model
![](/download/attachments/64326579/Screen%20Shot%202014-10-28%20at%201.44.15%20PM.png?version=1&modificationDate=1414532690967&api=v2)
XML Form Edit GUI
This GUI models the XML Definition, allowing the user to add/remove/edit form elements, as well as change their order.
- Common Form Elements
- Implemented by all elements.
- XML CRUD Actions (Create, Read, Update, Delete)
- Advanced Form Elements
- Only implemented by some elements.
- In most cases they will not be modified
XML CRUD Actions are very important. They define how to create/read/update/delete XML nodes using the form elements value and properties.
All actions define the Path and Path Context properties. These define where approximately in the XML document will the action be performed.
Path is an XPath that defines where the action will take place.
Path Context defines what context the path can be executed in. It can be one of three values:
- Document: The XPath is executed at the root of the document.
- Parent: The XPath is executed at its parents context. This is only valid if the form element is embedded in another form element like a tab panel or fieldset, and that tab panel or fieldsets Read action selected an XML node.
- Self: The XPath is executed in the context selected by the Read action. This can be a bit tricky to understand. Read is the first action performed on the form element before rendering the element. Its used to populate the form element with a value. The node in which it gets its value from is set to be the Self context.
XML Node Actions
Create
- Path: XPath to the parent node where this new element will be inserted
- Path Context: The context in which Path is executed.
- Schema: The XPath to this elements to create’s definition.
- Type: One of three values: Element, Attribute, XML. This is the type of XML node that will be created. XML stands for a XML snippet.
Element
- Value: The name of the type to create if it is Element orAttribute. If it is XML then it will be a XML snippet where the form fields submitted value will replace %value% in the snippet.
Read
- Path: XPath to the element we want to use to populate this form field.
- Path Context: The context in which Path is executed.
Update
- Path: XPath to the element to update. This will often be self::node().
- Path Context: The context in which Path is executed, this is often self which means it refers to the node selected by Read.
- Schema: Schema path to the elements definition, this is used for validating the submitted form values.
Delete
- Path: XPath to the element to delete. This will often be self::node().
- Path Context: The context in which Path is executed. This is often self which means it refers to the node selected by Read.
How to Edit/Create Ingest Forms
Islandora.ca modules:
- Islandora XML Form API
- Islandora XML Schema API
- Objective Forms
- PHP Lib