Document the Form Array standard
Created by: eileenmcnaughton
Per dev/core#115 (closed) we have a new standard for defining form fields at the php level & such that they can be generically displayed & overridden via php (e.g in the buildForm hook) by changing what fields are assigned
The specification is for an iterable fields array that would be assigned as
$this->assign('entityFields', $fields); or similar - e.g per this pr or the entity trait
And the tpl level it is rendered through & iterated - e.g per FIeld.tpl
Field spec (first cut) looks like
'field_1' => [
'name' => 'field_1',
'description' => ts("description to show below field"),
'help' => ['id' => 'id-field_1, 'file' => 'CRM/Contact/Form/Contact',
'is_add_translate_dialog' => 1,
],
'field_1' => ['name' => 'field_1'],
'money_field' => ['name' => 'money', 'formatter' => 'crmMoney'],
'weird_looking_field' => [
'name' => 'weird_looking_field',
'template' => CRM/Member/Form/MembershipType/weird_looking_field.tpl',