impress-org / givewp-snippet-library

A collection of code snippets to enhance or expand on the free Give WordPress Donation Plugin.
https://givewp.com
140 stars 90 forks source link

Form Fields that modify the total, conditionally. #33

Closed Benunc closed 7 years ago

Benunc commented 7 years ago

Issue Overview

This is a much requested feature. Here's a use case to describe what folks are looking to do:

Use Case: charity dinner/golf tournament/social event

In one form, the charity wants to be able to collect money for a dinner event. A part of this dinner event is a pre-dinner golf tournament, and after-dinner cocktail party. The three parts of the event have three separate costs.

John brings his family of 4 to the dinner, but is the only one in his party that is playing golf. He and his wife are staying for the social event. There should be a way to indicate if the participants are going to participate in the golf tournament, the social event, or the dinner, and update the total accordingly without setting a multilevel form with tons of options.

Everything should be handled in one transaction, and the form could be kept very minimal. Dropdowns for number of people attending each portion of the event, that update the total, then donate.

Potential solution

This could be added to form field manager, or split out as a separate add-on. Piggybacking off of Fee Recovery's conditional modification of the donation total would be useful as well.

mathetos commented 7 years ago

Now that you spell it out here more clearly, I think this issue will do it for you: https://github.com/WordImpress/Give-Form-Field-Manager/issues/84

Review that and let me know.

Benunc commented 7 years ago

YES. This is precisely what we would need. Adding my comments here to there and closing this.