Skip to Content Skip to Menu

Ajax validation on custom field

  • llau
  • llau
  • OFFLINE
  • Posts: 38
  • Thanks: 1
  • Karma: 0
9 years 10 months ago - 9 years 10 months ago #257128 by llau
Ajax validation on custom field was created by llau
Hi there,

I have created a custom text field "Organization Name" on the registration form and I need this value to be validated against the database by checking to see if there is already an existing value. The requirement is that no registered members should have the same organization name entered in this text field. If there is, then it should prevent the user from registering, like the way the username field gets validated after entering the name on the CB registration form.

It doesn't look like it's possible to use the "Field entry validation" for this kind of validation, or is there something else that I can use? I'm not a professional member yet, but would either the "CB DB Lookup Field" or the "CB Query Field" plugin meet my requirements?

Better yet, is there a default lookup field that one can enable to a custom field on their registration form?

Any help or advice is greatly appreciated.
Thanks in advance. :)
V
Last edit: 9 years 10 months ago by llau. Reason: additional information

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

  • llau
  • llau
  • OFFLINE
  • Posts: 38
  • Thanks: 1
  • Karma: 0
9 years 10 months ago #257252 by llau
Replied by llau on topic Ajax validation on custom field
I've tried the CB mysqlfield field, but it's not ajax based so it doesn't really work for me.
Would the CB Ajax Text Field plugin work, and can we use it on an existing custom field?

Thanks,
V

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

  • nant
  • nant
  • OFFLINE
  • Posts: 12339
  • Thanks: 1467
  • Karma: 877
9 years 10 months ago #257273 by nant
Replied by nant on topic Ajax validation on custom field

llau wrote: Hi there,

I have created a custom text field "Organization Name" on the registration form and I need this value to be validated against the database by checking to see if there is already an existing value. The requirement is that no registered members should have the same organization name entered in this text field. If there is, then it should prevent the user from registering, like the way the username field gets validated after entering the name on the CB registration form.

It doesn't look like it's possible to use the "Field entry validation" for this kind of validation, or is there something else that I can use? I'm not a professional member yet, but would either the "CB DB Lookup Field" or the "CB Query Field" plugin meet my requirements?

Better yet, is there a default lookup field that one can enable to a custom field on their registration form?

Any help or advice is greatly appreciated.
Thanks in advance. :)
V


The latest CB Query field for CB 2.0 (Professional membership needed) allows you to do this.

I have on my 2DO list to create a video tutorial on our videos page in the near future about this.

www.youtube.com/joomlapolis

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

  • llau
  • llau
  • OFFLINE
  • Posts: 38
  • Thanks: 1
  • Karma: 0
9 years 10 months ago #257325 by llau
Replied by llau on topic Ajax validation on custom field
Thanks for the reply, Nant.

Will the CB Query field work if I am currently using CB 1.9.1, or would I need to upgrade?

Also, how would I use this in conjunction with an already existing field, for example, can I still have the user enter their "organization name" in the text field since it's storing about 200 records or so.

Does the CB Query field use ajax validation against the database after the user has entered the text in the field and could I set it up to enter the value into a custom CB field if the query does not match what I'm looking for (eg. SELECT * FROM cb_comprofiler where fieldname = inputvalue)?

V

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

  • llau
  • llau
  • OFFLINE
  • Posts: 38
  • Thanks: 1
  • Karma: 0
9 years 10 months ago #257332 by llau
Replied by llau on topic Ajax validation on custom field
Will the latest version of Community Builder 2.04 work with PHP Version 5.3.28?

Thank you kindly,
V

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

  • nant
  • nant
  • OFFLINE
  • Posts: 12339
  • Thanks: 1467
  • Karma: 877
9 years 10 months ago - 9 years 10 months ago #257357 by nant
Replied by nant on topic Ajax validation on custom field
CB 2.0.4 is required and it will work on PHP 5.3.3+

Does the CB Query field use ajax validation against the database after the user has entered the text in the field and could I set it up to enter the value into a custom CB field if the query does not match what I'm looking for (eg. SELECT * FROM cb_comprofiler where fieldname = inputvalue)?


Yes this is doable - Professional membership is needed.
Last edit: 9 years 10 months ago by nant.

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

Moderators: beatnantkrileon
Powered by Kunena Forum