Need help with Joomla? We are available for hire to help with Joomla customization, upgrades, maintenance, and custom development.
Explore our services

Custom Fields - Checkbox - Required

  • ozwest
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
7 years 6 months ago #124338 by ozwest
Custom Fields - Checkbox - Required was created by ozwest
I need to have a consent from the user when he submits an event and there I have created a custom field to do so:

<field name="agreement" type="checkbox" label="Tick to agree and submit your event" size="1" description="Tick this box only if you agree that"></field>

Now I need to make it required for the user to have that field ticked before he can submit the event. How do I do this?

Thank you

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

More
7 years 6 months ago #124339 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Custom Fields - Checkbox - Required
Add class="validate[required]" to the checkbox code and it should work well

Tuan
The following user(s) said Thank You: ozwest

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

  • ozwest
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
7 years 6 months ago #124342 by ozwest
Replied by ozwest on topic Custom Fields - Checkbox - Required
Works wonderfully, thank you and Happy Easter

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

More
7 years 6 months ago #124360 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Custom Fields - Checkbox - Required
Great. Happy to hear that it works well for you. Happy Easter to you, too

Tuan

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

Moderators: Tuan Pham Ngoc