Skip to Content Skip to Menu

🌲 Merry Christmas! Great savings on Professional and Developer Memberships! Get 25% off now with code XMAS-2024!

CB Query Field 3.1.0 released!

  • krileon
  • krileon
  • ONLINE
  • Posts: 48622
  • Thanks: 8302
  • Karma: 1446
11 years 4 months ago - 11 years 4 months ago #231409 by krileon
CB Query Field 3.1.0 released! was created by krileon
CB Query Field has received its second major upgrade. It now includes "Query Validation" for several fieldtypes such as text, textarea, name, username, integer, etc.. (basically all internal fieldtypes that require user supplied values). Note due to the way editor fieldtypes work it is not supported. Password fields are also not supported for security purposes.

Query validation will take the value the user has supplied to your field and allow it to be substituted into a database query. This database query will determine if the value should be validated or not. You could for example query the database and ensure they're not supplying a value that has already been supplied.

Validation is PHP side and optionally Ajax enabled. So you can validate a field using a database query without a single page load! Custom translation supported error message for invalid values also available.

Query can be on an internal or external database. Example usage as follows.

Query:
Code:
SELECT * FROM `#__users` WHERE `username` = '[value]'
Mode: Internal
Validate On: Empty Results
Validate Error: Not a valid input.
Ajax Validation: Enabled

With the above example the value supplied to the field must be an existing username within your users database table. If it is not then the field will fail validation.


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.
Last edit: 11 years 4 months ago by krileon.
The following user(s) said Thank You: pepperstreet

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

Moderators: beatnantkrileon
Powered by Kunena Forum