1

I am trying to figure out how to allow user to update their contact details, such as address, VAT number and allowing them to upload necessary documents such as health and safety policy etc.

I also want renew page to be multi step such as step1: update details, step2: upload necessary document, step3: view total cost and final do the payment.

I would be thankful, if anyone can help me. I am now trying the hook: civicrm_buildForm to add various additional field in the membership renew form. But I am still not sure how to make it multi steps.

2 Answers 2

1

If you are using Drupal with a no-redirection payment processor, your best chance to do this is by using Webform CiviCRM. Webform comes with a lot of functionnality like multisteps, fields grouping and conditional fields.

Otherwise, if you are not in Drupal or want to have a cross platform solution, i can see 2 possibilities :

  1. you do a contribution page with profile containing all the fields you need and then you add javascript to make it multistep (e.g. jquery steps). You might find it difficult to make CiviCRM embedded javascript to work in all context.
  2. you do a contribution page that is the first step of the process and then redirect to a profile to let the user update its information when the payment is done (the user won't be able to see the thankyou page so you might want to add a thank you message in the profile). You should be able to do so using CiviCRM hook_civicrm_buildForm like :

    function myextension_civicrm_buildForm($formName, &$form) {
      if ($formName == 'CRM_Contribute_Form_Contribution_ThankYou') {
        $formId = $form->getVar('_id');
        if ($formId == FORM_ID) {
          ...
          $url = CRM_Utils_System::url('civicrm/profile/edit', "gid={$gid}&id={$indId}&reset=1&context=thankyou" . $checksum, FALSE, NULL, FALSE);
          CRM_Utils_System::redirect($url);
        }
      }
    }
    
0

In addition to samuelsov answer, if you want to redirect to a profile after a contribution page you can look at the Front End Page extension (note requirement for civicrm entity setting extension)

Your Answer

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

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