Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support custom data on optional (combined) entities (eg. Phone) #8

Open
mattwire opened this issue Aug 10, 2018 · 5 comments
Open

Support custom data on optional (combined) entities (eg. Phone) #8

mattwire opened this issue Aug 10, 2018 · 5 comments

Comments

@mattwire
Copy link
Contributor

When creating custom blocks custom data for combined optional entities such as "Phone" is not available to add to the block.

@mattwire
Copy link
Contributor Author

Seems to track back via core crm.backbone js to here: https://github.com/civicrm/civicrm-core/blob/master/CRM/Core/BAO/UFGroup.php#L708.

@colemanw
Copy link
Member

@mattwire I think there are 2 parts to this:

  1. Do CiviCRM profile forms support these fields at all?
    After creating a custom block, try editing it the old-school way by going to Administer -> Customize Data & Screens -> Profiles - are you able to add the fields from there? And do they then show up when you view a contact with that block in the summary?
  2. If yes to the above, we need to track down where these fields should be getting added to the backbone model, and add them.

@colemanw
Copy link
Member

@mattwire are you able to test the above?

@colemanw
Copy link
Member

colemanw commented Aug 15, 2018

FYI I tried this out with a custom Address field and found that:

  1. It works perfectly when added to the block via the old-school profile editor.
  2. It works imperfectly when added via the popup profile editor on the layout config page.
  • The custom field does appear.
  • But the "Location type" option is missing, rendering it somewhat broken -- note there is no "(Primary)" following the custom field:

screenshot from 2018-08-15 11-03-17

@mattwire
Copy link
Contributor Author

Address seems to be a bit of a special case currently. This branch takes a step towards enabling inline custom data for any of the location type entities (eg. Phone, IM etc): https://github.com/mattwire/civicrm-core/tree/inline_customdata

But I don't think it's actually retrieving the value and some work needs to be done in formatUFGroup around this line: $name = "address_{$name}"; to make it actually display the values.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants