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

frjo’s picture

Version: 7.x-1.0 » 7.x-1.x-dev
Category: bug » support
Priority: Critical » Normal

Modal 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?

jatinkumar1989’s picture

http://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)

frjo’s picture

How are you adding the Facebook login?

jatinkumar1989’s picture

yes, i am using FB connect module for facebook connectivity..

frjo’s picture

Status: Active » Fixed

The 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...

jatinkumar1989’s picture

i 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.

frjo’s picture

No 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.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.