Table of Contents |
---|
Panel | ||||||
---|---|---|---|---|---|---|
| ||||||
This tutorial assumes that you generated a work type name GenericWork. If you used a different name, substitute that name for all occurrences of GenericWork and generic_work. |
...
This class inherits from Hyrax::Forms::WorkForm which has several methods of note.
Method | Description | Overridden? |
---|---|---|
terms | Returns an array of all terms that will be displayed on the form. | Common |
required_fields | Returns an array of terms that are required and will be displayed at the top of the form (above the fold). They will be visible when the new/edit form is initially displayed. | Common |
primary_terms | Returns the required_fields array. | NO |
secondary_terms | Returns the array of terms that are optional and will be displayed at the bottom of the form (below the fold). These fields are hidden until the user clicks | Sometimes |
multiple? | Given a field, return true if it is multi-value. This is sometimes overridden to force a basic multi-value metadata field provided by the system to be single-value. | Sometimes |
sanitize_params | Clean up params passed back from the form. This is sometimes overridden to put a single-value into the format of a multi-value metadata field for basic multi-value metadata that was forced to be single-value. | Sometimes |
See Other Metadata Customizations in section Making a default property single-value for an example of when you would override multiple?
and sanitize_params
.
...
For additional instructions, see Hyrax Autocomplete.
\uD83D\uDCCB Related articles
...
.
...