[SOLVED] Add controls on some registration fields

9 years 1 week ago #147988 by ienna
I'm using community builder 1.3 and I have addedd into the registration two fields, that is two codes of a product, I would like to check these two fields so that nobody can register users with false codes, these codes are entered in a table created by me.
Is there a way to make this?
thank in advance

Post edited by: ienna, at: 2010/12/07 14:59

Post edited by: ienna, at: 2010/12/13 08:36

Post edited by: krileon, at: 2010/12/13 16:39
9 years 1 week ago #148037 by krileon
You could use a text field and adjust the validation method to use PERL regular expression and validate against a list of words/numbers. There's no way without developing a new fieldtype plugin to validate against your database. The below regex should do the trick.

[code:1]
/^STRING1|STRING2|STRING3|STRING4|ETC..$/
[/code:1]


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Templates - CBSubs - Hosting - Forge - Incubator - GroupJive
--
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 EST to 4:00 PM EST. 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.
9 years 5 days ago #148185 by ienna
please can you explain step by step how can I adjust the validation method, or how and where I place the code?? (if it is not a problem)
sorry but I'm a bit inexperienced about CB :(

Post edited by: ienna, at: 2010/12/09 11:49
9 years 5 days ago #148212 by ienna
ok I did it, but the problem is that the list of codes is continuously updated, at least once a day, is convenient use this type of control?
9 years 5 days ago #148255 by krileon
ienna wrote:

ok I did it, but the problem is that the list of codes is continuously updated, at least once a day, is convenient use this type of control?

In this case you'll have to continuously update the field. Only other alternative is to develop a new fieldtype plugin, which is significantly more complicated if no development knowledge is present.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Templates - CBSubs - Hosting - Forge - Incubator - GroupJive
--
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 EST to 4:00 PM EST. 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.
9 years 4 days ago #148321 by ienna
it seems that there is no alternative, is there a tutorial to do this?
Moderators: beatnantkrileon
Time to create page: 0.456 seconds

Facebook Twitter LinkedIn