Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

To access the XML form builder, log into your Islandora site as an administrator, and navigate to Islandora > Form Builder (admin/islandora/xmlform). You should see the screen below: 

Image RemovedImage Added

Here you will see all of the forms currently available. From this point you can create, copy, edit, view, export, or associate forms. When creating a new form, it is best to start by cloning the existing form associated with the content model your collection is utilizing. 

...

Once you have determined which form that you wish to clone, select it from the drop down menu and click “Copy.” On the next screen you will be prompted to give your form a name: 

Image RemovedImage Added

Make sure your name is something that you will remember. 

...

You will be redirected to the Form editing interface, and receive a message at the top that your form has been successfully created: 

Image RemovedImage Added

About the Form Builder Interface 

  1. Select “Form Properties” to view the properties of your form.
  2. Under “Elements” you can view all of the fields you have created for your form, as well as make changes to those fields. Clicking on these elements will allow you to view the way that each element will be created, read, updated, and deleted when you interact with the form, and the resulting metadata that the form will write. 
  3. Save” to save changes, and “Save and Preview” to save the changes and render the form in the preview screen.

Image RemovedImage Added

If you wish to create a form using a new schema, you will have to create a new form from scratch, or clone a form of the appropriate schema. This requires both knowledge of XPath, and of the .xsd affiliated with that schema. If you wish to create new elements, you will also have to be familiar with Xpath. 

...

If you wish to change the label of a field, or populate the field with a default value (for example, if you want to pre-populate an author field for a author-specific collection) then you need to change the element’s properties. To do this, you would select the element, and be presented with configuration options for that element. 

Image Modified

Here, I can change the label presented to users interacting with this field, by changing the “Title” of the element. I can also change the description that appears underneath the field, by changing the text in the “Description” field. If I want the field to be pre-populated with the creator’s name, I can also indicate the name in the “Default Value" field. In addition, if I want to make this field mandatory for my form, I can select the “Required” checkbox, and this field will appear with an asterisk, and the form will not be able to be submitted without filling in this field. Once I have made these changes, if I press “Save and Preview,” I will be able to view the form as it will appear to my users. 

Image Modified

Here you can see I have changed the default “Creator” label to “Author” and have provided customized instructions below this field for my users. I have also pre-populated the Author field with a name. This will prevent unnecessary repetition for users ingesting items into this collection. However, if there is a case where the author’s name is different, the user can still edit this field on ingest. 

Once you have tweaked this form, you will have to associate it with the appropriate content model in order for this form to appear as an option for users on ingest. To create an association between your new form and a content model, navigate back to Islandora > Form Builder (admin/islandora/xmlform) and select "Associate" on the form you wish to associate with a content model. You will see the following page:

Image RemovedImage Added

At the top of the screen, you can see that all existing form associations are rendered. In order to fill this form appropriately, ensure that you are familiar with the details of your solution pack - particularly the name of the content model, and the name of the metadata stream it prescribes. If you are not sure, please review the Solution Pack documentation for your installed solution packs. 

...

When you start the module you are presented with a list of forms (those are the forms that come bundled with your Islandora install) and a series of options to perform.

Image RemovedImage Added

Create Form: Select to begin the process of creating a metadata form from scratch or from an existing form definition file (an XML Form Builder form).

...

In the Create Form dialogue enter a form name - for example we are creating a basic OAI DC form so a name like oai_dc_basic would be appropriate. If you have an existing XML Form Builder form you could upload the form definition. We’ll be creating this OAI DC XML form from scratch, so we can click on Create.

Image Modified

The module should report that it successfully created a new form called oai_dc_basic.

Image Modified
This is the main form building/editing interface for creating XML forms and it provides methods for adding form properties, form fields and a preview pane.

Setting Form Properties

Image Modified
When creating an XML form the first thing you need to set in the Form Editor is the Form Properties. This is where having an example of an OAI DC record would come in handy and would provide the information you need to fill in the Form Properties. Here is the part of the record that you’ll use:

...

It provides information about the Root Element Name, the Namespace URI, the location of the Schema, as well as the various namespaces needed.

Image Modified
Select Save once you have the properties entered. Once the form properties have been entered you are ready to add elements to your form.

...

Required: Indicates whether or not the element is required. This automatically validates for empty fields, and flags inputs as required. Fields with a type of file are not allowed to be required.

Image Modified

The rest of the form deals with where each element is created, read, updated, and deleted in the XML tree. This is where it would be useful to understand how XML works and to have a basic understanding of XPATH.

...

  • Create action is about selecting the parent node where the new node will be created.

Image Modified
The rest of the form deals with where the element will be read, updated, and/or deleted from.

...

Info

Note: You can Update or Delete nodes other than the node which is Read - For example with mods:name … where sub-elements are created with a form field and additional nodes are automatically created with XML code. We may want to delete/update the entire mods:name and its sub-elements.

Image Modified

Adding the creator element - an element that may have multiple values

...

This image displays the first step of the creation of the creator element.

Image Modified

The second step is to create a nested tag type element. The image below displays the values for the properties used for this element.

Image Modified

Adding a textarea type form field - the dc:description element

For element that require a description or that contain a large amount of text, the textarea type form field is used.

Image Modified

Adding a select type form field - the dc:type element

...

1. When adding information about the element we will use the same method that we have used previously.

Image Modified

2. To add terms to your select form field you need to click on the More Advanced Controls tab in the Element Form pane. Review the image below and enter your terms in the Options panel.

Image Modified

Adding a datepicker type form field - the dc:date element

For this example we are using the datepicker type of form field. You will want to review your existing metadata as another type of form field may be more appropriate.

Image Modified

The remaining two elements for our sample OAI DC XML form, dc:subject (tags, tag) and dc:rights (textarea), can be built in the same manner as fields of a similar type that we have already created.

...

Note

Note: the Identifier for this form field type must be ingest-file-location.

Image Modified
Image Modified

Form Associations Module

...

Administer > Content management > Form Associations

Image Modified
In this example we will associate the form we created - oai_dc_basic - with the islandora:sp_strict_pdf content model. Review the image below to fill out the Form Associations dialog.

Form Associations Dialog

Image Modified

Navigating to a Collection

Once the association has been successfully created, you can try ingesting new objects into a collection that has the islandora:sp_strict_pdf content model associated with it. In this case, the Islandora demo VM has a PDF collection associated with the islandora:sp_strict_pdf content model. Navigate to the PDF collection using the image as a guide.

Image Modified

Once in the collection (you can tell where you are by the breadcrumb), select the Add tab to add a new PDF to the collection.

Adding a PDF to the Collection

Image Modified
You will be presented with a dialog requesting two pieces of information: the content model and the form to use for ingest.

Selecting the Associated Form

Image Modified

Entering Metadata

You will be presented with the form that we created during this tutorial. You’ll need to fill it in. Once you’ve completed your data entry, submit the form.

Image Modified

Image Modified

Image Modified