3

We are in the process of building out a contribution form (not webform) with the One-Time and Monthly option buttons at the top of the donation form.

We are trying to figure out the best option to update the Monthly amounts when someone toggles from One-Time to Monthly.

Has anyone done this? If so, what do you recommend?

  • 1
    I'm thinking of writing a small extensions that exposes an option on priceset fields "display for: all contribution types / only non-recurring / only recurring", which would then generate a bit of javascript to show/hide the appropriate options. – bgm Nov 13 at 21:29
  • With building the form do you mean do it programmatically? – Jaap Jansma - CiviCooP Nov 14 at 8:29
  • Yep, well, only the javascript duct-tape to show/hide the appropriate priceset fields depending on whether the user wants to do a recurring or one-time donation. – bgm Nov 14 at 14:28
4

The extension is available on CiviCRM's Gitlab.

It adds a new option that is visible in the administration of the priceset, so that admins can decide when to display a specific priceset field value:

Screencast of an example form

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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