Questions about Payment Form extension

Setting a minimum fee

  • Alan Henness
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
5 months 3 weeks ago #162152 by Alan Henness
Setting a minimum fee was created by Alan Henness
I have a form that has two numeric fields that allow users to select the number of vegan meals and the number of meat meals required for an event. The user may be paying just for her/himself or for several guests.

I have set the fee field for the numbers of each type of meal to be [FIELD_VALUE]*40 and this correctly sums the two fields to give the total fee.

I have set the minimum for each to zero so that a user can select zero for one meal type and whatever number for the other meal type they require. I have set one meal type to have a default of 1 and this gives a default total of £40.

However, this means that a user can select zero for each giving a total of zero when what I want is a minimum of £40. I can't set the minimum for either meal type to 1 as the user may not want that type of meal.

How can I ensure that at least one of one meal type is selected so that the user will pay £40 minimum?

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

More
5 months 3 weeks ago #162159 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Setting a minimum fee
Hi Alan

I'm unsure if this is possible. Could you please try to use this validation rule: github.com/posabsolute/jQuery-Validation-Engine#grouprequired

Basically, edit the two fields, set Validation Rule to validate[groupRequired[payments]] , then try to see if it works ?

Regards,

Tuan

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

Moderators: Tuan Pham Ngoc