Pre-Filling In Registraton Form

14 years 1 month ago #130230 by ibscas
Pre-Filling In Registraton Form was created by ibscas
I'm trying to figure out how I can pre-fill in certain fields on the registration.

I've been able to make a plug in that allows me to pass a variable via the query line (&email=xxx@yyy.com), what I would like to now do is have that email address be the default value for the 'email' field in the CB registration.

Can someone give me an idea of what code I could use to achieve this?

I thought that perhaps I could even write a JS function that is in my template page but I don't know how I would execute that function from the plugin. I then checked out the onAfterFieldsFetch but can't make heads or tails about how I could use that to change the value of the email field.

Any help is greatly appreciated!

Please Log in to join the conversation.

14 years 4 weeks ago #130324 by krileon
Replied by krileon on topic Re:Pre-Filling In Registraton Form
You could use a language string to perform a substitution using the following example. You'll need to use the trigger onBeforeRegisterFormDisplay within your plugin. Then set the default field value for the email field to _DEFAULT_EMAIL.

Then write a plugin which executes the trigger on the following function (attached as a file due to forum security).

Attachment example_email_replacer.txt not found



Please note this is just an example and only 1 of the many ways to accomplish this.


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.
Attachments:

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.182 seconds

Facebook Twitter LinkedIn