Topic-icon Auto fill information in Rsforms

Active Subscriptions:

None
13 years 7 months ago #27252 by anepor
Hoi,
I'm building a form with RSforms. Is it possible to make use of JFBConnect Profile Import so that after login my form automtically gets filled in for supported (Full Name, First Name, Middle Name, Last Name, Hometown etc...)?

Does this make sense to you :-)?

Thanks,

Anes
The topic has been locked.
Active Subscriptions:

None
13 years 7 months ago #27283 by anepor
Hello support,

Can someone please take a look at my question?

Thanks.
The topic has been locked.
Support Specialist
13 years 7 months ago #27304 by alzander
Anes,
I don't know RSForms well enough to tell you how to automatically populate it's content. You can get information about a Facebook user with the following code. Filling that into RSForms is something you'd need to ask them for though:
$jfbcLibrary = JFBConnectFacebookLibrary::getInstance();
        $fbUserId = $jfbcLibrary->getFbUserId();
        $fields = array(0 => 'first_name', 1 => 'last_name', 2 => 'status', 3 => 'email', 4 => 'name');
        $profile = $this->getUserProfile($fbUserId, $fields);
You can add as many fields to the $fields array as you want, but they must be ones that are supported by Facebook. Additionally, you'll need to have already had the user login to your site so that they've given permission for you to fetch their profile and get the information you're looking for.

Generally, in these cases, we'd recommend using something like JomSocial or Community Builder. With those, you can import the user's information into their profile on login using our profile plugins. If you don't do that, you'll need to investigate how to do the custom coding to pre-populate the RSForm you're trying to use.

Hope that helps get you started, but if you have other questions, just let us know!

Thanks,
Alex
The topic has been locked.