Writing the schema
Repeatable sections
{
"id": "contributors",
"title": "Contributors",
"repeatable": true,
"initial_instances": 0,
"repeat_label": "Contributor",
"add_label": "+ Add Contributor",
"prefill_from_user": {
"fields": {
"nameType": { "value": "Personal" },
"given_name": { "profile": "given_name" },
"family_name": { "profile": "family_name" },
"orcid": { "profile": "orcid_url", "label_profile": "name" },
"affiliation": { "profile": "affiliation_ror", "label_profile": "affiliation_name", "search_profile": "affiliation_name" }
}
},
"output": {
"path": "contributors",
"mode": "collect_object"
},
"fields": [ ... ]
}
prefill_from_user (optional, repeatable sections only) lets the consumer offer to fill an empty instance from the profile of the signed-in user, and stop offering it once the person is in the section. Each key of fields is a field id of the section. value is a fixed value (an option, for a select); profile names a key of the profile the consumer holds; label_profile names the key of its label (for an api_search field, whose value is an id and a label). Give either value, or profile and/or search_profile: search_profile names a key whose text is typed in the search of a search field (so the person picks the result) when profile has no value to select one, for example an employer known by name only. The keys of the profile belong to the consumer: ckanext-fair3r offers given_name, family_name, name and orcid_url (the iD of the user's linked ORCID account, with the name of its public record), and affiliation_name and affiliation_ror (the current public employment of that record, with its ROR when ORCID gives one). Without a profile, nothing is offered.
initial_instances:0= no pre-filled rows;1= one row shown by default- Only works when
repeatable: true
