All Versions
DSpace Documentation
...
To meet such requirement, DSpace allows you to greate groups of nested metadata in the submission for and the item page.
The default group in submission will become a nested form and will be opened in a modal, to isolate the form and create connections between
...
groups of metadata.
Example of configuration:
To use nested metadata groups, update your submission-forms.xml and item-submission.xml:
<step-definition id="publicationStepGroup" mandatory="true"> <heading>submit.progressbar.describe.stepone</heading> <processing-class>org.dspace.app.rest.submit.step.DescribeStep</processing-class> <type>submission-form</type> </step-definition>
Then reference it in a submission process:
<submission-process name="publication-submission"> <step id="collection"/> <step id="publicationStepGroup"/> </submission-process>
For group input type (used with relation-field), create a main form and child forms following the naming convention formName-dc-element-qualifier:
Main form (publicationStepGroup):
<form name="publicationStepGroup"> <row> <row> <relation-field> <relationship-type>isAuthorOfPublication</relationship-type> <search-configuration>person</search-configuration> <repeatable>true</repeatable> <label>Author</label> <hint>Enter the author's name (Family name, Given names).</hint> <linked-metadata-field> <dc-schema>dc</dc-schema> <dc-element>contributor</dc-element> <dc-qualifier>author</dc-qualifier><relation-field> <relationship-type>isAuthorOfPublication</relationship-type> <input<search-type>group<configuration>person</inputsearch-type>configuration> </linked-metadata-field> <repeatable>true</repeatable> <label>Author</label> <externalsources>orcid</externalsources> <hint>Enter the author's name.</hint> <linked-metadata-field> <required></required> <dc-schema>dc</dc-schema> <!-- You may choose to validate author names via a Regular Expression if it's appropriate for <dc-element>contributor</dc-element> <dc-qualifier>author</dc-qualifier> your institution. The below regex requires a comma to be present in the author field. <input-type>group</input-type> </linked-metadata-field> <externalsources>orcid</externalsources> However, this is disabled by default to support organizations as authors, etc. -- </relation-field> </row> </form>
publicationStepGroup-dc-contributor-author):<form name="publicationStepGroup-dc-contributor-author"> <row> <field> <!--<regex>\w+(,)+\w+</regex>--> dc-schema>dc</dc-schema> <dc-element>contributor</relationdc-field>element> </row> <form name="publicationStep-dc-contributor-author"> dc-qualifier>author</dc-qualifier> <label>Author</label> <row><input-type>onebox</input-type> <field> <repeatable>false</repeatable> <required>You must <dc-schema>dc</dc-schema> enter at least the author.</required> <dc-element>contributor</dc-element> <hint>Enter the names of the authors.</hint> <dc-qualifier>author</dc-qualifier></field> </row> <row> <label>Author</label> <field> <input<dc-type>onebox<schema>oairecerif</inputdc-type>schema> <repeatable>false</repeatable> <dc-element>author</dc-element> <required>You must enter at least the author.</required> <dc-qualifier>affiliation</dc-qualifier> <label>Affiliation</label> <hint>Enter the names of the authors of this item in the form Lastname, Firstname [i.e. Smith, Josh or Smith, J].</hint> <input-type>onebox</input-type> <repeatable>false</repeatable> <required /field>> </row>hint>Enter the affiliation of the author.</hint> <row></field> </row> </form>
For inline-group input type (simple field grouping):
<form name="publicationStepGroup"> <field><row> <dc-schema>oairecerif</dc-schema><field> <dc-element>author<<dc-schema>dc</dc-element>schema> <dc-qualifier>affiliation</dc-qualifier> <label>Affiliation</label><dc-element>contributor</dc-element> <input-type>onebox</input-type><dc-qualifier>editor</dc-qualifier> <repeatable>false</repeatable> <repeatable>false</repeatable> <label>Editor</label> <required /> <input-type>inline-group</input-type> <hint>Enter the affiliation of the author as<hint>The statededitors onof thethis publication.</hint>hint> </field> required>You must enter at least the author.</required> </field> </row> </form>
...
/row> </form>
Note: Child forms must be named using the pattern: {parentFormName}-{dc-element}-{dc-qualifier} for the group input type to resolve correctly.
A new group type called inline-group has been added to mantain the groups inside the main form and not in a modal, follows and example of config:
Please note that the inline-group has as a limitation: all the fields need needs to be configured inside one tag.
If you want to achieve a display on multiple rows, it can be don through styling, adding for example to each field the style tag as follows: <style>col-12</style>
This is a known limitation and should be added to the documentation as such.
<row>
<field>
<dc-schema>dc</dc-schema>
<dc-element>contributor</dc-element>
<dc-qualifier>editor</dc-qualifier>
<label>Editor group</label>
<input-type>inline-group</input-type>
<repeatable>true</repeatable>
<required />
<hint>Add the editor of this publication</hint>
</field>
</row>
<form name="publicationStep-dc-contributor-editor">
<row>
<field>
<dc-schema>dc</dc-schema>
<dc-element>contributor</dc-element>
<dc-qualifier>editor</dc-qualifier>
<label>Editor</label>
<input-type>onebox</input-type>
<repeatable>false</repeatable>
<required>You must enter at least the author.</required>
<hint>The editors of this publication.</hint>
</field>
<field>
<dc-schema>oairecerif</dc-schema>
<dc-element>editor</dc-element>
<dc-qualifier>affiliation</dc-qualifier>
<label>Affiliation</label>
<input-type>onebox</input-type>
<repeatable>false</repeatable>
<required />
<hint>Enter the affiliation of the editor as stated on the publication.</hint>
</field>
</row>
</form>
...
Please note that is not possible to add repeatable fields inside the nested forms, this would result in errors in the UI breaking the form. This is a known limitation and should be added to the documentation as such.
Input type specific configuration, as the regex, should be added inside the nested form configuration, as they don't work on input types which represent nested forms. (not an actual control in the form).Note: A custom layout option will follow in a different PR, wich will allow to group those metadata also on Item page (CRIS Layout).
Note: For inline groups is possible to configure an additional button with the property showInlineGroupDuplicateButton , which if true, will display under the form a button to duplicate the whole section, metadata values included.
...