Field Summation Validation...I Think

  • Garrett Fried
  • Topic Author
  • Offline
  • New Member
  • New Member
More
11 years 7 months ago #48094 by Garrett Fried
Field Summation Validation...I Think was created by Garrett Fried
To anyone who might be able to assist with this setup, I'm all ears:

I have two "groupings" of custom fields setup for an event, let's call them GROUP A, fields A1, A2, A3. I also have a collection of fields collectively called GROUP B, and with related custom fields named B1, B2, B3.

What I am trying to do is allow the registrant to register a group of individuals, indicated by inputting this into the first step of the registration process, but allow the user to provide a breakdown of the number of registrants into the fields in GROUP A and GROUP B. Therefore, the sum of all textbox (number) fields of each group (individually) would be validated against the number provided in the first step, to be sure it is equal. This needs to happen for both GROUP A and GROUP B independently.

For example:
The group leader initiates the registration process by clicking the "Register (Group)" button. In the first step, that person enters the total number of attendees. Let's say 10. Based on those 10 individuals, each of them may wear a different shirt size and each of them may want something different for lunch. GROUP A would be the grouping of all allowable shirt sizes from which the registration may break down the number 10 into the number of each size required. Then GROUP B would be the collection of fields whereby the registrant can specify how many of each lunch option needs to be allocated (e.g., # of hamburgers, # of hot dogs, # of pizza slices). The total of each group of these fields needs to add up to the same number indicated in the first step. Otherwise, it should provide an error and not allow the registration to proceed to confirmation and payment.

Is this something easily achieved in the field validation step? If so, can someone shed some light or provide an example code or setup? I would be most grateful.

Thanks,
Garrett

Please Log in or Create an account to join the conversation.

More
11 years 7 months ago #48105 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Field Summation Validation...I Think
Hi Garrett

Unfortunately, as I can see, the extension could not be setup for these kind of complicated validation :(.

Tuan

Please Log in or Create an account to join the conversation.

Moderators: Tuan Pham Ngoc