How do i add parent information to a teenage volunteer profile so that when a new volunteer fills out their profile, it creates a parent relationship and contact as well. I am using Profile-Create Mode to allow the data input on our website.


2 Answers 2


You would need to created an extension using civicrm hook 'hook_civicrm_postProcess' which gets invoked when a civicrm form is submitted as you want the actions to be taken upon profile submission so this should work for you. In the hook you can create the relationships through the API call.

Detailed documentation on hook.

Hope this helps.

  • What I have read about Hook is that it is for forms? I literally created a profile and used it on our website to be filled out directly using theProfile-Create Mode.
    – Melinda
    Commented Jan 16, 2018 at 19:54

You would have to find out all the steps the profile goes through and potentially use the post or apiWrapper hook to create the parent. Difficult to say without knowing all the details.

But you could also use the Form Processor extension rather than creating a profile to get there? Documentation on the Form Processor extension can be found here: https://docs.civicrm.org/formprocessor/en/latest/

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.