Built-in field widget components¶
See also
For the local replacement forks of upstream invenio_rdm_records field components (PIDField, TitlesField, …), see Replacement field components.
Warning
The documentation from this point on is in rough draft form and is currently being edited. Check back shortly for updates.
Stock component wrappers¶
The package maintains a componentsRegistry that maps available field-level components to strings you can use in your layout configuration. Components are included for all of the field widgets from the stock InvenioRDM deposit form (defined in field_components/field_components.jsx). Each wraps a stock Invenio RDM or vocabularies field and inserts it into the form layout following your configuration:
AbstractComponent
AccessComponent
AccessRightsComponent
AdditionalDatesComponent
AdditionalDescriptionComponent
AlternateIdentifiersComponent
CommunitiesComponent
CommunitiesAlternateComponent
ContributorsComponent
CopyrightsComponent
CreatorsComponent
PublicationDateComponent
DeleteComponent
DoiComponent
FileUploadComponent
FormFeedbackComponent
FundingComponent
HorizontalSubmissionComponent
LanguagesComponent
LicensesComponent
PublisherComponent
ReferencesComponent
RelatedWorksComponent
ResourceTypeComponent
SubjectsComponent
SubmissionComponent
TitlesComponent
VersionComponent
Where the same logical field or region has more than one component (access, submit area, form feedback), see Multiple components for the same field or region below.
Multiple components for the same field or region¶
Some fields or layout regions have two (or more) registered components. The layout config chooses which one to use by name.
Access (visibility)¶
AccessRightsComponent — Wraps the stock
AccessRightFieldinFieldComponentWrapper, readsrecord,permissions, andconfigfrom the deposit store, and passesrecordRestrictionGracePeriod,allowRecordRestriction, andshowMetadataAccessinto the field. Use this in your layout (e.g. in the right sidebar) so the visibility field is fully wired.AccessComponent — Registered name for the raw
AccessRightFieldwith no wrapper. It does not receiverecord,recordRestrictionGracePeriod, orallowRecordRestrictionfrom the layout, so it is not suitable for the default config. It remains in the registry for instances that reference it by name or that pass those props another way.
Submit area (save, preview, publish, delete)¶
SubmissionComponent — Matches the stock invenio-app-rdm sidebar: a Card with DepositStatusBox (draft/published status), then a button grid (Save | Preview, Publish, Share), then an optional second Card with DeleteButton. No form feedback inside the component (use FormFeedbackComponent above it in the sidebar). This is the default in the package layout.
HorizontalSubmissionComponent — Two-column layout: one column with FormFeedback (when there are errors or action state), Save, Preview, Publish, Share, and Delete buttons; the other column with helptext about drafts and publishing. Use this in your layout config if you prefer this layout instead of the stock-style cards.
OverrideSubmissionComponent (in
field_components/overridable/) — Overridable variant that uses SubmitButtonModal and the same horizontal layout; register it via the Overridable slotInvenioAppRdm.Deposit.CardDepositStatusBox.containeror as the component for the submit section in the registry.
Form feedback (errors and action state)¶
FormFeedbackComponent — Standalone block that shows form feedback (validation errors, non-validation errors, and action state). It renders nothing when there is nothing to show. Use it as a separate subsection in the right sidebar (e.g. above SubmissionComponent) so feedback appears above the submit buttons without being part of the submit component itself. The default layout uses it that way.
Implementation (modular package): Renders
FormFeedbackfromreplacement_components/alternate_components/FormFeedback.jsx(paths relative toinvenio_modular_deposit_form/assets/semantic-ui/js/invenio_modular_deposit_form/). The per-section list inside the message comes fromFormFeedbackSummaryinreplacement_components/alternate_components/form_feedback_components/FormFeedbackSummary.jsx.hideMessageIcon: Optional prop forwarded toFormFeedback. Defaulttrue: the Semantic UIMessagehas no leading icon (compact sidebar). Setfalseto show the severity icon fromfeedbackConfig(check / info / warning / times circle).
Contrib components¶
Additional components are defined in field_components/contrib/ for metadata fields that have no stock InvenioRDM equivalent (e.g. SizesField):
SizesComponent
Overridable components¶
All of the stock form field components listed above can be overridden using the regular ReactOverridable mechanism. A sampling of override components, offering variations on the stock field widgets, are defined in field_components/overridable/:
OverrideAdditionalDatesComponent — uses DatesFieldAlternate
CommunitiesAlternateComponent —
field_components/alternate/;CommunityField. ForCommunityHeader.containermapping when the layout uses stockCommunitiesComponent, use CommunitiesAlternateField from the same module (inner field only).Languages — default
LanguagesComponentuses replacementLanguagesField(no separateOverrideLanguagesComponent; noLanguagesField.containerentry in instance mapping unless you add one).ResourceTypeSelectorComponent —
field_components/alternate/; button-style resource type (ResourceTypeSelectorField). For the deposit overridable slot, mapResourceTypeField.containertoResourceTypeSelectorField(inner field only; layout still providesFieldComponentWrapper).OverrideSubmissionComponent — uses SubmitButtonModal and custom form feedback; same horizontal layout as HorizontalSubmissionComponent. See Multiple components for the same field or region (submit area) above.
In your instance’s assets/js/invenio_app_rdm/overridableRegistry/mapping.js file, you can import any of these components from @js/invenio_modular_deposit_form/field_components/overridable. See Override guide for slot ids.
Alternate components¶
Alternate components live in replacement_components/alternate_components/ and offer a different UX for the same logical field. They are registered in the componentsRegistry alongside their standard counterparts, so you can swap between them by changing the component name in your layout config.
CreatorsComponentFlat / ContributorsComponentFlat¶
These use CreatibutorsFieldFlat instead of the stock CreatibutorsField. The default layout config uses CreatorsComponentFlat for creators. To revert to the modal-based version, change "component": "CreatorsComponentFlat" back to "component": "CreatorsComponent" in your common_fields config. For contributors, use ContributorsComponentFlat in place of ContributorsComponent.
Behavioral differences from CreatorsComponent / ContributorsComponent:
Area |
Standard (modal) |
Flat (inline) |
|---|---|---|
Editing |
Opens a modal dialog with its own internal Formik instance and Yup validation schema. |
Expands an inline form panel beneath the item. Edits write directly to the parent Formik context (no nested Formik or Yup schema). |
Reordering |
Drag-and-drop only. |
Drag-and-drop plus explicit Up/Down buttons with |
Identifier editing |
Dropdown that stores identifier strings, with scheme resolved on save via serialize/deserialize. |
Explicit text + scheme-select rows in a FieldArray. Each identifier is a |
“Add myself” |
Not available. |
An “Add myself” button pre-fills a new entry from the logged-in user’s profile (name parts, identifiers, affiliations). |
Focus management |
Focus stays in the modal while it is open. |
Focus returns to the “Add” button after closing or removing an item. New items auto-focus the name search field. |
Validation visibility |
The modal validates on submit via its internal Yup schema. Errors appear inside the modal. |
No per-item schema. Errors come from the parent form validator. Opening an existing item for edit marks all its subfields as touched so that existing errors are immediately visible. |
Name autofill |
Remote search via |
Same remote search and autofill flow. Identifiers are set as |
Transition animation |
Modal open/close. |
Fade transition on the inline panel. |
All other behavior (person/organization toggle with cached identifiers and affiliations per type, role selection, affiliation search via /api/affiliations, Overridable extension points on each form section) is the same.
Custom field components¶
Defined in field_components/custom_field_components.jsx. They use the CustomField component (see the Extending guide, section Handling custom fields), which reads widget and props from the InvenioRDM custom field UI config (custom_fields.ui). These cover resource-type-specific custom metadata (imprint, journal, meeting, code, thesis, etc.) and are registered by default for use in type-specific layouts.
BookTitleComponent
CodeDevelopmentStatusComponent
CodeProgrammingLanguageComponent
CodeRepositoryComponent
ISBNComponent
JournalISSNComponent
JournalIssueComponent
JournalTitleComponent
JournalVolumeComponent
MeetingAcronymComponent
MeetingDatesComponent
MeetingPlaceComponent
MeetingSessionComponent
MeetingSessionPartComponent
MeetingTitleComponent
MeetingURLComponent
PublicationLocationComponent
SectionPagesComponent
ThesisDateDefendedComponent
ThesisDateSubmittedComponent
ThesisDepartmentComponent
ThesisTypeComponent
TotalPagesComponent
UniversityComponent
Gotchas¶
By default the imprint:imprint.pages field is used for total pages in a publication, while the journal:journal.pages field is used for page numbers in a larger work. So the BookSectionPages component uses the journal:journal.pages field. If this does not match your InvenioRDM schema, you may override this component.
PID / DOI (
DoiComponent→ replacementPIDField) — Visible validation errors follow the same touched rules asTextField. The replacement fork sets Formiktouchedon unmanaged-input blur and when managed/unmanaged (or optional DOI) radios change; see Formik touched and this fork.