Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: lt & gt replaced by < and >

...

  1. This XML file contains form definitions, each contained within its own
    Code Block
    &lt;form&gt;<form>
    element. Each
    Code Block
    &lt;form&gt;<form>
    element contains
    Code Block
    &lt;page&gt;<page>
    elements that represent single pages of input. Each
    Code Block
    &lt;page&gt;<page>
    element contains
    Code Block
    &lt;field&gt;<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
    &lt;form-definitions&gt;<form-definitions> 
    Code Block
       &lt;form<form name="traditional"&gt;>
    Code Block
          &lt;page<page number="1"&gt;>
    Code Block
              &lt;field&gt;<field>
    Code Block
                    ...
    Code Block
              &lt;/field&gt;</field>
    Code Block
            &lt;/page&gt;</page>
    Code Block
       &lt;/form&gt;</form>
    Code Block
    &lt;</form-definitions&gt;definitions> 
  2. The default form has a
    Code Block
    name
    attribute whose value is
    Code Block
    "traditional"
    . To change all submission forms throughout DSpace, edit the XML inside this form.
  3. To change a submission form for a specific collection, add a new
    Code Block
    &lt;form&gt;<form>
    element with a new and unique collection-related value for the
    Code Block
    name
    attribute. (You can copy the XML from the default and edit as desired, as long as you change the
    Code Block
    name
    attribute value.)
    • Once you've created your new
      Code Block
      &lt;form&gt;<form>
      element, you will have to map it to your specific collection using the
      Code Block
      &lt;form-map&gt;<form-map>
      section at the top of the XML:
      Code Block
      &lt;form-map&gt;<form-map> 
      Code Block
      &lt;name<name-map collection-handle="default" form-name="traditional" /&gt;> 
      Code Block
      &lt;</form-map&gt;map> 
    • You'll need to create a new
      Code Block
      &lt;name-map&gt;<name-map>
      element to "map" your collection's handle to the new
      Code Block
      &lt;form&gt;<form>
      you just created.
  4. Create all appropriate
    Code Block
    &lt;page&gt;<page>
    elements, numbering them sequentially starting from 1 in the
    Code Block
    number
    attribute. Within them, add individual
    Code Block
    &lt;field&gt;<field>
    elements according to this template:
    Code Block
    &lt;field&gt;<field> 
    Code Block
         &lt;dc-schema&gt;dc&lt;<dc-schema><dc></dc-schema&gt;schema>
    Code Block
            &lt;dc-element&gt;identifier&lt;<dc-element>identifier</dc-element&gt;element>
    Code Block
         &lt;dc-qualifier&gt;citation&lt;<dc-qualifier>citation</dc-qualifier&gt;qualifier>
    Code Block
         &lt;repeatable&gt;false&lt;/repeatable&gt;<repeatable>false</repeatable>
    Code Block
         &lt;label&gt;Citation&lt;/label&gt;<label>Citation</label>
    Code Block
         &lt;input-type&gt;onebox&lt;<input-type>onebox</input-type&gt;type>
    Code Block
         &lt;hint&gt;Enter<hint>Enter the standard citation for the previously issued instance of this item.&lt;/hint&gt;</hint>
    Code Block
         &lt;required&gt;&lt;/required&gt;<required></required>
    Code Block
              &lt;vocabulary&gt;&lt;/vocabulary&gt;<vocabulary></vocabulary>
    Code Block
    &lt;/field&gt;</field> 
  5. Stop and restart Tomcat (See Quick Restart in Rebuild+DSpace).

Notes:

  • The
    Code Block
    &lt;required&gt;<required>
    element contains the textual hint displayed to the submitter about why the field is required. Leave it empty for optional fields.
  • The
    Code Block
    &lt;vocabulary&gt;<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
    &lt;vocabulary<vocabulary closed="true"&gt;srsc&lt;/vocabulary&gt;>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
    &lt;input-type&gt;<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 the
      Code Block
      &lt;value-pairs&gt;<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 requires
      Code Block
      &lt;repeatable&gt;<repeatable>
      is set to "true")
    • "textarea"
  • Setting the
    Code Block
    &lt;repeatable&gt;<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.