Files:
[dspace]/config/input-forms.xml
Instructions:
This XML file contains form definitions, each contained within its own
Code Block <form>
element. Each
Code Block <form>
element contains
Code Block <page>
elements that represent single pages of input. Each
Code Block <page>
element contains
Code Block <field>
elements with instructions for creating the fields on that page. This structure is mocked up below, for a single form with a single page.
Code Block <form-definitions>
Code Block <form name="traditional">
Code Block <page number="1">
Code Block <field>
Code Block ...
Code Block </field>
Code Block </page>
Code Block </form>
Code Block </form-definitions>
- The default form has a
Code Block name
attribute whose value isCode Block "traditional"
. To change all submission forms throughout DSpace, edit the XML inside this form. - To change a submission form for a specific collection, add a new
Code Block <form>
element with a new and unique collection-related value for theCode Block name
attribute. (You can copy the XML from the default and edit as desired, as long as you change theCode Block name
attribute value.)Once you've created your new
Code Block <form>
element, you will have to map it to your specific collection using the
Code Block <form-map>
section at the top of the XML:
Code Block <form-map>
Code Block <name-map collection-handle="default" form-name="traditional" />
Code Block </form-map>
- You'll need to create a new
Code Block <name-map>
element to "map" your collection's handle to the newCode Block <form>
you just created.
Create all appropriate
Code Block <page>
elements, numbering them sequentially starting from 1 in the
Code Block number
attribute. Within them, add individual
Code Block <field>
elements according to this template:
Code Block <field>
Code Block <dc-schema><dc><schema>dc</dc-schema>
Code Block <dc-element>identifier</dc-element>
Code Block <dc-qualifier>citation</dc-qualifier>
Code Block <repeatable>false</repeatable>
Code Block <label>Citation</label>
Code Block <input-type>onebox</input-type>
Code Block <hint>Enter the standard citation for the previously issued instance of this item.</hint>
Code Block <required></required>
Code Block <vocabulary></vocabulary>
Code Block </field>
- Stop and restart Tomcat (See Quick Restart in Rebuild + DSpace).
Notes:
- The
Code Block <required>
element contains the textual hint displayed to the submitter about why the field is required. Leave it empty for optional fieldsRemove the tag to transform field to optional. The
Code Block <vocabulary>
element is optional. It allows you to specify the controlled vocabulary (see Use Controlled Vocabularies for more information) that this field should select its values from. This field also has an optional
Code Block closed
attribute. If closed is set to true, a user can only select values from the controlled vocabulary. By default, closed is set to false, which allows a user to also enter in free text if he/she chooses. For example:
Code Block <vocabulary closed="true">srsc</vocabulary>
- The name of the controlled vocabulary must correspond to the name of the XML file (without ".xml") which contains the vocabulary. So, in the above example,
Code Block srsc
references the vocabulary specified in the file located at[dspace]/config/controlled-vocabularies/srsc.xml
- Valid input types (for
Code Block <input-type>
) are:- "date"
- "name" (two text boxes, labeled last and first name)
- "onebox" (a one-line textbox)
- "twobox" (two textboxes on a single line)
- "dropdown" (for which you must specify a
Code Block value-pairs-name
attribute referring to theCode Block <value-pairs>
list of allowed values, see Change + a + form + value) - "qualdrop_value" (a textbox, which is preceded by a "qualifying" dropdown of values. Requires a
Code Block value-pairs-name
attribute, similar to "dropdown". Also requiresCode Block <repeatable>
is set to "true") - "textarea"
- Setting the
Code Block <repeatable>
element to "true" creates an "Add more" button, which allows you to add multiple values into that particular field. Examples of this include the authors and keywords fields in the standard DSpace submission process.