2

I have created a custom fieldset "Social Profile" in CiviCRM which contains one Yes/No field "Publish my profile" that is set to Yes (value 1) by default. If i edit the fieldset in one contact, i can see my default value is working fine.

Then, I have created a membership page that allow people to become new members. When they fill the form a new CiviCRM contact is created. The form doesn't contains the "Social Profile".

When a new member register, the information Publish my profile is not initialized. After verification, it seems that the custom fieldset is not initialized for the contact - no data in civicrm_value_xx for entity_id = <NEW_CONTACT_ID>

So my question : Is there a way to force initialization of the custom field set for a new contact ?

1 Answer 1

8
  1. Can you include 'publish my profile' custom field in your membership page?

  2. If option 1 is not possible, the next best bet might be to implement the civicrm postProcess hook on membership form and create the custom field record in the form.

Civi only creates custom field records on a as needed basis

alternatively you might be able to do the above via use of mysql triggers (maybe on creation of a contact record?)

1
  • Thanks, that confirm what i thought. In my case, adding "publish my profile" in the membership page is the simpliest option but there may be some case of member creation not using the membership page.
    – samuelsov
    Commented Oct 27, 2014 at 13:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.