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

WIP Consolidate code to add custom fields to form #11910

Closed
wants to merge 1 commit into from

Conversation

mattwire
Copy link
Contributor

Overview

Proposal for consolidating code for custom data on forms (initial step) V2 - Ref #11899

Before

No functional change.

After

No functional change.

@mattwire
Copy link
Contributor Author

We still need a line like this in postProcess to actually save the custom data if it doesn't already exist:

$params['custom'] = CRM_Core_BAO_CustomField::postProcess($submitted, $this->_id, 'MembershipType');

@mattwire mattwire changed the title Consolidate code to add custom fields to form WPI Consolidate code to add custom fields to form Mar 31, 2018
@mattwire mattwire changed the title WPI Consolidate code to add custom fields to form WIP Consolidate code to add custom fields to form Mar 31, 2018
@eileenmcnaughton
Copy link
Contributor

@mattwire I looked at the tpl extraction just now & have confirmed that part works - if you put that in a separate PR I could do a quick merge on it.

Regarding the other part - I'm trying to get my head around how it would work with mulitple data blocks - ie. address, email, website - & still digging on there. I have a simple extraction PR here as part of that #11900 (which I could merge if you wanted to review)

My thinking is to build up something like

$this->customDataEntities = ['Contact' => ['id' => [4]], 'Address' => ['id' => [5,6,7]];

& have the trait or helper able to parse & process that array

@mattwire
Copy link
Contributor Author

mattwire commented Apr 5, 2018

Template extracted to PR #11950

@eileenmcnaughton
Copy link
Contributor

@mattwire thanks - merged

@eileenmcnaughton
Copy link
Contributor

@mattwire I'm going to close both of these as they are still both WIP. I will try to put some more time in soon & will re-open one or both when they seem merge ready

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

Successfully merging this pull request may close these issues.

3 participants