Force initialization of custom field set in CiviCRM 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 = &lt;NEW_CONTACT_ID&gt;

So my question : Is there a way to force initialization of the custom field set for a new contact ?
Can you include 'publish my profile' custom field in your membership page?
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?)