[SOLVED] Hidden Registration Fields?

12 years 7 months ago - 12 years 7 months ago #176891 by laptoproadie
[SOLVED] Hidden Registration Fields? was created by laptoproadie
In order to save programming time we would like to use CB for a contest. People goto the website, register via CB registration, and are entered into the user table (contest poo) from which a weekly script that we'll create will run and pick x number of winners from.

We created some additional fields, namely cb_ContestParticipant (as we have other users who are doctors and uneligable) and cb_ContestWinnder (that our custom php cron job will run every week and update the database convert x number of cb_ContestWinner=0 to cb_ContestWinner=1 along with a cb_WinnerPickDate that will be populated to different each batch of contest winners (winners will be chosen every week for about 6-8 weeks.

What's the best way to do this? At the moment I can't think of a way around hacking the registration page just a little so it will have a hidden field cb_ContestParticipant with a value of 1 so that we'll know this is a contest registratiion.

(We also use the DB user table to house Doctor profiles for visitors of the site to come and get their numbers and other misc info about their practice.) I thought of just using groups as a differentiator but I want this to be idiot-proof. There is no registration to the site at all. This contest will be the first instance where we need it at the same time want them separate from the users already in the db.


Thanks!
Will P

Please Log in to join the conversation.

12 years 7 months ago #176896 by krileon
Replied by krileon on topic Re: Hidden Registration Fields?
You can conditional show/hide fields based off other fields during registration (and profile edit) using incubator project CB Conditional. You could also use a delimiter field and just input the HTML for a hidden input as its content to avoid hacking, but you'd need a plugin to utilize the after registration trigger to do something with the hidden inputs value. CB seams like overkill for simple contest entry form. Maybe want to review extension like BreezeForms where you can create custom forms for data reporting and storage.


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 to join the conversation.

12 years 7 months ago #176919 by laptoproadie
Replied by laptoproadie on topic Re: Hidden Registration Fields?
Normally I'd agree with you Krileon but we're already using it to house our database of doctors so I thought it would be easier to use CB (plus we're more familiar with it, even hacking it the few times it's been necessary).

Breezeforms has a SaaS pricetag on it and our clients aren't looking to spend money every month just for a contest.

I have the registration form in place, I mainly need to know how to make sure there are hidden fields that update the db in there. I'll try the CB conditional and see if that works.

The other thing is the CBredirect plugin. I installed it and am trying to use it to redirect users who register to a 'thank you' page. It looks like I set it up correctly, but I'm still getting the default CB registration message, which I'm not sure where it's even coming from.

Please Log in to join the conversation.

12 years 7 months ago #176981 by laptoproadie
Replied by laptoproadie on topic Re: Hidden Registration Fields?
I got it working.

Using the CBredirect registration redirects to the article of my choosing.

CBconditional allowed me to put a hidden field to flag the registering user as a contest participant.

Using another extension might have been better in the long run, but with as much CB can do and my familiarity with it now it's hard to beat even for tasks like this. :)
The following user(s) said Thank You: krileon

Please Log in to join the conversation.

12 years 7 months ago #177073 by krileon
Replied by krileon on topic Re: Hidden Registration Fields?
It's amazing the possibilities of CB! Can even be used as a contest entry form, who knew! Thank you for sharing your experience and solution, appreciated. :)


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 to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.192 seconds

Facebook Twitter LinkedIn