Topic-icon Prevent 'Name: *' field from being shown during manual registration

Active Subscriptions:

None
12 years 4 months ago - 12 years 4 months ago #40925 by guero
Hi,

I am trying to not show the field 'Name: *' during the registration process when JFBC Automatic registration is set to 'no'. However, I haven't been able to do so. Is there a specific setting I am missing or is it simply not possible to not show the Name during registration to the user (and if so, why out of curiosity).

Thank you!
Oliver
File Attachment:
Last edit: 12 years 4 months ago by guero.
The topic has been locked.
Support Specialist
If you would have asked me, I would have said there was already an option to hide the Name field. I'm not sure why there isn't, honestly. It's likely just never been asked for, so we never implemented. However, it's pretty easy to do, if you'd like to on your own.

To do so, please edit the /components/com_jfbconnect/views/loginregister/view.html.php file. Around line 74, you should see:
$this->form->setValue('name', null, $providerMemberName);
Simply add the following after that:
if ($providerMemberName != '')
    $this->form->setFieldAttribute('name', 'type', 'hidden');
That will check that a name is being set (which should always be the case, but never hurts to make sure) and, if so, hide that field.

Please test and let me know how it goes, and good luck!
Alex
The topic has been locked.
Active Subscriptions:

None
Thanks, Alex! Will try and report back. If there is a chance you could include this in JFBC 5.2.3 or so, that would be great. We're trying to cut back on modifying 3rd party components so that when we upgrade to new versions we don't lose the changes :)

Two other suggestions or things I have noticed that perhaps nobody else has asked for before either:

1. When setting "Registration Display Mode" to "Register Only", the text displayed as preface on the registration page reads "Welcome <firstname>! Thanks for signing in using Facebook. Do you already have an account on this site, or would you like to create one?". Perhaps it would be good to use two separate strings somehow because the boldface part here is only confusing in this case.

2. I believe you can't import data using JFBC from, e.g., FB and map it onto fields of type 'select' or 'radio'? This is such a pity IMHO. Consider the use case of auto-importing the gender or country from FB to some CB field. It's only possible when the field is of type 'text' or 'textarea'. However, since some people wish to sign up manually (via email) they would then have to type out the word male or female or their country name, instead of choosing from a dropdown or radio button selector.

I think I understand the reasoning behind it, as the imported data could be something else than the values predefined for 'select' or 'radio'. However, I don't think this would be a problem even if that happened. Because in that case, if the user would then go to his or her profile edit, the field in question would simply have no value anymore and the user would have to choose one of the predefined ones.

Especially if this 2nd suggestion here would make it to a future version of JFBC, I would be most grateful.

Thank you again,
Oliver
The topic has been locked.
Support Specialist
It won't be a part of the 6.0 release, which is planned for about 2 weeks from now. However, we've already added it to our feature tracker to be added to the release after that. It's a minor change and something we think others would like, so it will definitely be an option in JFBConnect soon.

1. When setting "Registration Display Mode" to "Register Only", the text displayed as preface on the registration page reads "Welcome <firstname>! Thanks for signing in using Facebook. Do you already have an account on this site, or would you like to create one?". Perhaps it would be good to use two separate strings somehow because the boldface part here is only confusing in this case.

We just (as in two days) had a member of our translation team ask the same question. We've had that setting for about 2 years now, and these are the first times that that string has been called out. I've added it to our tracker. We already have a planned graphical update of that page coming, so it'd be good to re-evaluate the strings as well.

2. I believe you can't import data using JFBC from, e.g., FB and map it onto fields of type 'select' or 'radio'? This is such a pity IMHO.

That's true in the general case, but not all cases. We do support importing gender into JomSocial and some other extensions. I don't remember off the top of my head if we support it in CB yet. Any specific structure fields (dates, gender, country, etc) have the ability to be supported, though we may not yet.

The fields we can't support are arbitrary radio/selection lists (What genre of book do you like?) since there's no way to know what data Facebook would return and 'map' that into your specified options. Things like dates, gender, countries, etc have 'fixed' (generally) values that we should be able to import into..

I hope that helps explain. As noted, if there are specific fields you'd like supported in CB, let me know (it sounds like country and gender, but want to make sure those weren't just examples).

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
Hi Alex, that's really good to hear. Yes, gender and country are not just two examples but what I would really like to have for our use case. There may be others. But those two are the ones that matter for us.

Keep up the great work! Thank you,
Oliver
The topic has been locked.
Support Specialist
Oliver,
I wanted to let you know that we've assigned this as a feature to investigate/develop. However, we're finalzing the upcoming v6.0 release (due out in about a week). After that, we'll be working on this to get it in the follow up release. If there's a line of code, or something minor we can provide, we'll let you know when we come up with it.

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
Thank you, Alex. That's nice.
Oliver
The topic has been locked.
Support Specialist
Glad to help, and best of luck. Should you need anything else, just let us know.

Thanks,
Alex
The topic has been locked.