Type: New Feature
Affects Version/s: None
Fix Version/s: 1.3
1. Profile Field and Group Preview (UF_Form_Preview)
This class allows users to preview a single UF Field OR a UF Group. Similar functionality to existing Custom/Preview.php component. Preview links are added as actions to Group and Field selectors.
2. Profile Field Support for Multiple Locations, Phones, etc.
2.1 Add location_type_id and phone_type columns to uf_field (as in civicrm_mapping_field)
2.2 Clone the hierselect behavior from Import Mapping for the CiviCRM Field Name element in Edit Profile Field form (e.g. if Street Address is selected, location_type drop-down appears; if Phone - then location_type + phone_type; etc.). Store 'mapped' location_type_id(s), etc in uf_field on save.
NOTE: User does NOT have to select location type, phone type etc - they may continue to have an unspecified location for address, city, state... as is currently done. In this case the 'create contact' code will insert these using the default location type as is currently done.
2.3 Render Profile (fieldset in form)
2.3.1 Location-specified elements (e.g. Street Address-Home) have fixed location_type_id's associated with them. We could implement this by including a hidden field for each with location type (and phone type for phones). Or ???
2.3.2 When rendering field labels, let's try the foll rules
- location types are NOT displayed (so only display 'Street Address' - even if 'Home' is specified). I think folks will configure Profile Groups with appropriate titles (which render as fieldset legend) which will collect 'Home' or 'Work' fields - so displaying 'Street Address-Home', 'City-Home' etc. will be redundant.
- phone types should be included in rendered form element label - e.g. Phone-Mobile [ ]
2.4 Modify Profile processing code to handle 'optional' passing of location_type_id, phone_type etc. when creating contact.