Questions about Payment Form extension

How to limit checkbox selections?

  • Joseph Zingarelli
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
1 year 3 months ago #160497 by Joseph Zingarelli
How to limit checkbox selections? was created by Joseph Zingarelli
So far I have 2 Custom Fields on my form.  The first Custom Field is a radio button with 2 choices.  The second Custom Field is a checkbox with 5 items in the list.  When Radio button 2 is selected the checkbox control is shown.  I need to require that the user select 2 of the checkbox choices and limit the user to selecting no more than 2 choices in the checkbox.

Right now the user can select from 1 - all of the checkbox items.

Thanks,
Joe
 

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

More
1 year 3 months ago #160498 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic How to limit checkbox selections?
Hi Joe

Please try to edit the field, set Validation Rules to validate[minCheckbox[2],maxCheckbox[2]] to see if it is working as expected

Regards,

Tuan

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

  • Joseph Zingarelli
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
1 year 3 months ago #160523 by Joseph Zingarelli
Replied by Joseph Zingarelli on topic How to limit checkbox selections?
The edit is not working.  I am including 3 images to give you details on how I've set up the custom control, filled out the form and the result.
Looking at the results (result.png), the field with the incorrect results is:Select 2 classes per week  Monday 12 PM - 1:30 PM
 My testing results are:
good: checkbox cannot be blank
bad: checkbox accepts < 1 selection
bad: checkbox accepts > 2 selections
Thanks for the help,
Joe
Attachments:

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

More
1 year 3 months ago #160526 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic How to limit checkbox selections?
Hi Joe

Could you send me link to the form? Or better, submit a support ticket sending us:

1. Super admin account of the site

2. Link to the form

3. Tell me ID of the field which needs this validation

I will check and configure it for you

Regards,

Tuan

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

  • Joseph Zingarelli
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
1 year 3 months ago #160527 by Joseph Zingarelli
Replied by Joseph Zingarelli on topic How to limit checkbox selections?
That's very kind of you Tuan.  I'll send the credentials via support ticket.

Joe

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

More
1 year 3 months ago #160536 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic How to limit checkbox selections?
Thanks Joe. Just want to update that this causes by a small typo in the code for the Checkboxes (and Radio) fields.

I fixed it on your site and also updated download package on server with this fix. If anyone is having this issue, please download latest package of Payment Form, upgrade it to the site and error will be gone

Regards,

Tuan

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

  • Joseph Zingarelli
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
1 year 3 months ago #160543 by Joseph Zingarelli
Replied by Joseph Zingarelli on topic How to limit checkbox selections?
Tuan,
The changes look good. Thank you!

Joe

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

More
1 year 3 months ago #160547 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic How to limit checkbox selections?
Great. Thanks for confirming Joe

Tuan

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

Moderators: Tuan Pham Ngoc