Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
HI All,
I want to add FB log in button as a form element and want to open this form as a Modal form
So, i alter the form and write the code
function HOOK_form_alter(&$form, &$form_state, $form_id){
$func = fbconnect_render_button(); // this function is written in fbconnect .module file, so i just call that function
$form['facebook_custom_link'] = array(
'#markup' => $func;
);
}
This function will work when you log in into FB in another tab,
But when you log-out from FB, it doesn't work...
Anyone can suggest me, If i am doing some mistake......
Again , i said i want to add FB log in button as a form element and, want to open this form as a Modal form.
Comments
Comment #1
frjo CreditAttribution: frjo commentedModal forms module support a number of specified forms to open as modals.
Are you trying to add the FB log in button to the standard login form and display that in a modal?
Can you add a link to an example site where we can see this problem?
Comment #2
jatinkumar1989 CreditAttribution: jatinkumar1989 commentedhttp://demo.developmentserver.info/filmscreenr/
click on login link, you will see a text 'connect' (FB just make a simple text on model form log in)
But when you go to URL http://demo.developmentserver.info/filmscreenr/user/login , you will see a f connect log in button, (that's work very fine)
Comment #3
frjo CreditAttribution: frjo commentedHow are you adding the Facebook login?
Comment #4
jatinkumar1989 CreditAttribution: jatinkumar1989 commentedyes, i am using FB connect module for facebook connectivity..
Comment #5
frjo CreditAttribution: frjo commentedThe fbconnect_button seems to need a specific id and submit handler as well. See how fbconnect does it here:
http://drupalcode.org/project/fbconnect.git/blob/refs/heads/7.x-2.x:/fbc...
Comment #6
jatinkumar1989 CreditAttribution: jatinkumar1989 commentedi didnt change any submit handler and also not using any other extra module. I dust enable fb connect module and make basic configuration (App id & secret key),
By default, this module make a FB login block, but i want fb connect button on user log in form.
so, i alter user login form and add a form item (FB coonect button) but this is not working in modal form.
Comment #7
frjo CreditAttribution: frjo commentedNo you didn't add a ID or submit handler but I think you must. That is how fb connect module does it and I don't think it will work otherwise.
Look at http://drupalcode.org/project/fbconnect.git/blob/refs/heads/7.x-2.x:/fbc... how it should be done.