Skip to Content Skip to Menu

🎃 Happy Halloween! Treat yourself with an awesome discount on memberships! Get 20% off now with code SPOOKY-2024!

[SOLVED] How to set email to usename field automatically?

  • Wai Wai
  • Wai Wai
  • OFFLINE
  • Posts: 24
  • Thanks: 2
  • Karma: 1
11 years 1 week ago - 11 years 3 days ago #235486 by Wai Wai
I don't use username field and allow user to log in by email and password.
When the user registers, CB automatically set firstname and lastname into username field as I configured "Name Style = Fist and Last Name filed" in CB Configuration page.

My question is how can I configure to set email to username field instead of 'firstname and lastname'?

When I configure 'Name Style = Single Name Field', email is saved into username field but 'First Name' and 'Last Name' are not shown in registration form. I still need them.
Last edit: 11 years 3 days ago by krileon.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48473
  • Thanks: 8281
  • Karma: 1443
11 years 1 week ago #235520 by krileon
For Email to pass to Username you have to hide username and name fields on registration. The alternative is use CB Auto Actions to set the username field to email address.


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.
The following user(s) said Thank You: Wai Wai

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

  • Wai Wai
  • Wai Wai
  • OFFLINE
  • Posts: 24
  • Thanks: 2
  • Karma: 1
11 years 1 week ago #235591 by Wai Wai
I used CB Auto Action to set email to username after registration and profile edit. It works. Thank.

But how can I hide User Type (cb_usertype) in profile edit form as it is not allowed to change after registered.

I used CB Conditional to hide it as below. The problem is the field is shown in a few seconds. After a few seconds, it is hidden. I don't want user to see it.

Display = Field conditional self
If... Fields = User Group (cb_usertype)
Is... Operator = Not Empty
Then... Mode = Hide
For... Registration = Disabled
Profile Edit = Enabled
Profile View = Enabled
Userlists Search = Disabled
Userlists View = Disabled
As... Direction = One-Way

I can't use CB Privacy too to hide it because this field value is checking to show or not to show other fields.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48473
  • Thanks: 8281
  • Karma: 1443
11 years 1 week ago #235606 by krileon
Set it to read only. This way it's still rendered but can't be changed. Believe this should still work with CB Conditional, but I can't recall if it ignores read only or not.


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 or Create an account to join the conversation.

  • Wai Wai
  • Wai Wai
  • OFFLINE
  • Posts: 24
  • Thanks: 2
  • Karma: 1
11 years 1 week ago #235639 by Wai Wai
Thank for the answer.

Is there any way to hide it rather than read only? CB Conditional works but the user can see the field before it disappears. It makes the user confused. He saw it just now then it disappears.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48473
  • Thanks: 8281
  • Karma: 1443
11 years 1 week ago #235657 by krileon
Set it to read only then use CSS to hide its field row. Right click the input and Inspect Element with Chrome or Firefox with Firebug to find its classes/IDs, you'll need the ID from its field row to hide it.


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 or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum