Skip to Content Skip to Menu

[#7746] This field is required validation message for checkbox

5 years 1 month ago - 5 years 4 weeks ago #314792 by mikeprince
Is it possible to display the 'This field is required' validation message (or some other text) for a checkbox? My registration form adds this message underneath all required fields that haven't been completed, along with changing the label and border colour. However for my checkbox for 'Accept terms and conditions', where I don't display a title, all that happens is that the 'accept' text changes colour, and this is not very obvious.

Ideally I'd like a different error message from the standard, so I could add 'Please accept the terms and conditions' for example.

Cheers
-- Mike --

Record, share and compare with BUBO Listing at www.bubo.org
Attachments:
Last edit: 5 years 4 weeks ago by krileon. Reason: Added [#7746] tag to subject

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48536
  • Thanks: 8290
  • Karma: 1445
5 years 1 month ago #314797 by krileon
It should display the required message. Ensure the acceptedterms field within CB > Field Management is marked required.


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.

5 years 1 month ago #314802 by mikeprince
It is a problem with modal rather than iframe. The latter works ok, but the former doesn't. Using the modal the page source includes

This is with the output being text rather than html, although I did use html before and maybe it is still picking that up somehow, hence the 'suppress HtmlUnknownTarget'?

Cheers
-- Mike --

Record, share and compare with BUBO Listing at www.bubo.org
Attachments:

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

5 years 1 month ago #314803 by mikeprince

krileon wrote: It should display the required message. Ensure the acceptedterms field within CB > Field Management is marked required.

Sorry, meant to add that it is indeed required.

Cheers
-- Mike --

Record, share and compare with BUBO Listing at www.bubo.org

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48536
  • Thanks: 8290
  • Karma: 1445
5 years 1 month ago #314859 by krileon
It doesn't matter what mode you use. They all flag the checkmark as required with the required class. If it's not checked at time of submit it will display the required message below it. If it's not you may have a conflict from something installed. Try switching to default Joomla protostar template and see if it works then. See below where it's working fine.




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.
Attachments:

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

5 years 4 weeks ago #314874 by mikeprince
Ok, this is a bug with certain configuration. If I set CB config > General > Field Icons to 'Only Info Icon', then I do not get the error message for the checkbox (as shown in the original post). If I change it to 'Only Required and Info Icons' it works fine, as per your screenshot.

Not sure whether it is part of the cause or not, but in the error case I notice that no <span class="cbFieldIcons"> tag is output in the HTML.

Cheers
-- Mike --

Record, share and compare with BUBO Listing at www.bubo.org

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

Moderators: beatnantkrileon
Powered by Kunena Forum