Topic-icon JFBConnect register chosen multiple select list

Active Subscriptions:

None
11 years 4 months ago #50858 by iozger
Hi,
I am using JFBConnect registering system for new users. I have one field users have to fill during registration. It is a multiple select list. But I would like to display it as a jquery chosen multiple select list. Since JFBconnect is using jquery is it possible to replace regular multiple select list with the jquery chosen multiple select ?
Thanks in advance.
The topic has been locked.
Support Specialist
11 years 4 months ago #50862 by mel
There's a few options here, but it ultimately depends on where the data is being stored. JFBConnect relies on other extensions for managing profile data besides making the actual link to the social network for the user.

With that said, if you're using one of the 3rd party extensions where JFBConnect can send the user through the other registration forms (Joomla, JomSocial or EasySocial), you can use those registration flows with JFBConnect and use whatever fields you already have configured and they should just work. If you're using the JFBConnect Login / Register page, then you may need to add some custom code to make the field work and possibly some extra code to store the field properly.

So, can you give more information on the field you're saving, where it's going, and how it works for users that are registering normally through Joomla? That will help us provide the best answer for you.

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

None
11 years 4 months ago #50872 by iozger
Thank you for your qiuck support,
I am using jomsocial. I created a custom profile. This custom field a list of countries and it is a multiple select list. I am using JFBConnect register. So JFBConnect is pulling that information from jomsocial during a user registration. Currently the field is displayed as a classical multiple select list where the user has to use ctlr button to select some countries which is not useful. So I am trying to convert the classical multiple select list into chosen multiple select list by using one of these harvesthq.github.io/chosen/
The topic has been locked.
Support Specialist
11 years 4 months ago #50876 by alzander
Gotcha. I haven't used chosen before, though I know it's a part of Joomla, so it shouldn't be too hard to add. My suggestion for where to start would be to edit our /plugins/socialprofiles/jomsocial/jomsocial.php file. In there is a getRegistrationForm($profileData) function. You can add anything you want to the $html output variable and it will be included on the page.

So, I'd recommend creating the Chosen code you want to use that targets the country field that's displayed on the page and push that code into the $html variable. Then, when the page loads, your Javascript should execute as well.

I hope that makes sense. It shouldn't be overly difficult, but you'll need to know a little PHP and Javascript (and Chosen, of course) to make it work like you want.

If you need anything else, just let me know.

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

None
11 years 4 months ago #50877 by iozger
thank you alex,
I will try it.
The topic has been locked.
Active Subscriptions:

None
11 years 4 months ago #50884 by iozger
I wanted to update as I came out with a pretty quick solution in the internet.
In my joomla template`s index.php file I added below lines and default multiple select function turned out to chosen multiple function.

JHtml::_('behavior.multiselect');
JHtml::_('formbehavior.chosen', 'select');
The topic has been locked.
Support Specialist
11 years 4 months ago #50897 by mel
Glad to hear that you got it working!

-Melissa
The topic has been locked.