• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: Limit the number of Checkboxes checked or warning

Limit the number of Checkboxes checked or warning 12 years 3 weeks ago #16825

Hi i just got the rsform recently and i have to be able to come up with a list of checkboxes for different types of food items.

The total number that a user is allowed to check is 8...
Can i limit or give some form of warning when they check 8 checkboxes?


There's 3 lists of checkboxes... cause one is for chicken, one is for fish, etc.

Any ideas???
The administrator has disabled public write access.

Re: Limit the number of Checkboxes checked or warning 12 years 3 weeks ago #16850

I figured it out by altering the example given in rsform..


Under Properties, Php Scripts
Script called on form proces

Type in:

if(count($_POST) + count($_POST) + count($_POST) > 7)
$invalid[] = RSFormProHelper::getComponentId("CHECKBOXGROUP_NAME_1");




WHERE YOU CHANGE THE "CHECKBOXGROUP_NAME_1" TO YOUR OWN CHECKBOX GROUP NAME...
7 is just a number you can change to any number... depending on how many you allow the user to check...
int this case, i only allowed less than 7...

Hope this helps others....
The administrator has disabled public write access.

Re: Limit the number of Checkboxes checked or warning 1 year 6 months ago #42244

  • Roberts
  • Roberts's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 54
  • Thank you received: 1
No.

if(count($_POST) + count($_POST) + count($_POST) > 3)
$invalid[] = RSFormProHelper::getComponentId("subject");

It doesn't work!
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!