HTML field level templates

CollectionSpace data input field types

CollectionSpace supports a wide variety of HTML data input field types. These include text, textarea, select (drop-down) and date picker fields, among others.

You can add data input fields within CollectionSpace's HTML template files. The following examples demonstrate the patterns that you can use for adding a new field to a record page or to change an existing field's data type.

Along with each example of HTML markup below, you can also view an example of the corresponding entry that you will need to add to an XML-based configuration file (see Unified CollectionSpace Config) as a declaration for that field.  Also see cspace-config Fields for a list of attributes that can be applied to each field declaration.

Note

You will substitute actual procedure and field names within the class="" attributes displayed below, wherever those values are represented by 'placeholder' values such as {recordid}-{fieldid}.

Single line text field

Example single line text field

Example markup in HTML template file

 

Example entry in Configuration file

 

Multi-line text field

Example multi-line text field

Example markup in HTML template file

 

Example entry in Configuration file

 

Term List

Example select field

There are two types of Term Lists - for more information, see: An overview of term lists

Example markup in HTML template file

 

Example entry in Configuration file: Static term list (configured via config file)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Unknown macro: {multi-excerpt}
<field id="{fieldid}">
<options>
    <option id="" default="yes">Please select a value</option>
    <option id="deaccession">Deaccession</option>
    <option id="disposal">Disposal</option>
    <option id="returnofloan">Return of Loan</option>
</options>
</field>

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Example entry in Configuration file: Term list (configured via UI)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Unknown macro: {multi-excerpt}
<field id="{fieldid}" autocomplete="vocab-languages" ui-type="enum">
  <enum>
    <default>urn:cspace:core.collectionspace.org:vocabularies:name(languages):item:name(eng)'English'</default>
  </enum>
</field>

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Date Picker field

Example date picker field

Example markup in HTML template file

 

Example entry in Configuration file

 

Number Pattern Chooser field

Example number pattern chooser field

Example markup in HTML template file

 

Example entry in Configuration file

 

Boolean (Checkbox) field

Example boolean/checkbox field

Example markup in HTML template file

 

Example entry in Configuration file