Difference between revisions of "Multipart field"

From EPrints Documentation
Jump to: navigation, search
(Added multipart metadata field type)
 
(Replaced content with "{{fieldtypes}} {{Deprecated|This metadata field type is far inferior to a Compound field that should be used instead.}}")
(Tag: Replaced)
Line 2: Line 2:
  
  
== Description ==
+
{{Deprecated|This metadata field type is far inferior to a [[Compound field]] that should be used instead.}}
This field is similar to a [[Compound field]] except...
 
 
 
== Inheritance ==
 
* [[Metadata]]
 
*** [[Multipart field]]
 
 
 
== Additional Properties ==
 
{| border="1" cellpadding="3" cellspacing="0"
 
| name || default || description
 
|-
 
| '''fields''' || n/a || '''This property is always required.'''
 
|-
 
| '''fields_cache''' || n/a || ''This property is always required but is generated from <code>fields</code>.''
 
|-
 
| '''fields_index''' || {}  || ...
 
|}
 
 
 
== Required Phrases ==
 
In addition tothe [[Metadata#Required_Phrases|standard metadata field phrases]]<code>type</code>.  The sub-field names in the form:
 
  datasetid + "_fieldname_" + fieldname + "_" + subfieldname
 
Individual fieldhelp phrases are not required the help for sub-fields should be included in the fieldhelp for the main field.
 
 
 
== Database ==
 
Multipart fields are stored in the database as multiple fields, whose types are determined in the sub-field configuration.
 
 
 
== API ==
 
See [[API:EPrints/MetaField/Multipart|API page]].
 
 
 
== Examples ==
 
Most basic example.
 
{
 
    name => 'email',
 
    type => 'multipart',
 
    fields => [
 
        {
 
            sub_name => 'subject'
 
            type => 'text'
 
        },
 
        {
 
            sub_name => 'body'
 
            type => 'longtext'
 
        },
 
}
 

Revision as of 09:16, 11 April 2023