Skip to Content Skip to Menu

[#5840] Limiting the number of selected items in a multiple checkbox field

  • peli_m
  • peli_m
  • OFFLINE
  • Posts: 54
  • Thanks: 6
  • Karma: 0
8 years 8 months ago #279115 by peli_m
Yes, of course. It's published and Public. And I have installed it in two different sites.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48536
  • Thanks: 8290
  • Karma: 1445
8 years 8 months ago #279118 by krileon
Ok, was able to confirm another bug is present. I've tested this exact scenario with the below code, which will work fine in next release (1.0.4).

Code:
if ( ! is_array( $value ) ) { $value = explode( '|*|', $value ); } return ( count( $value ) > 1 ? false : true );

CB Code Field 1.0.4 should be released soon today. Note currently the ajax validation will not function for multicheckbox or radio usages at this time.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

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

  • peli_m
  • peli_m
  • OFFLINE
  • Posts: 54
  • Thanks: 6
  • Karma: 0
8 years 8 months ago #279121 by peli_m
Thank you Krileon for your effort,

Well, it works in normal frontend edit, but with Ajax Validation I think it doesn't work, no validation effect occurs and I can mark all cells I want.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48536
  • Thanks: 8290
  • Karma: 1445
8 years 8 months ago #279153 by krileon

but with Ajax Validation I think it doesn't work, no validation effect occurs and I can mark all cells I want.

Correct, see my note above. Ajax validation doesn't work well with multicheckboxes at this time. I've added a bug ticket to look into this further, but likely will require some fixes in CB directly. Radio fieldtype also suffers from the same issue. No other fieldtypes should have this issue.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

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

  • peli_m
  • peli_m
  • OFFLINE
  • Posts: 54
  • Thanks: 6
  • Karma: 0
8 years 8 months ago #279163 by peli_m
Sorry, I had not read last paragraph. Thank you again and I'm waiting for the improvement.

Community Builder is a fantastic component and I think code field and ajax with their integrations in other fields extends our possibilities hugely. Congratulations!
The following user(s) said Thank You: krileon

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

Moderators: beatnantkrileon
Powered by Kunena Forum