Welcome Guest, Not a member yet? Register   Sign In
facebox form submission
#1

[eluser]zorka[/eluser]
Hello,

I have a standard login page with a standard FORGOT PASSWORD option. I am poping up a FACEBOX when people click on FORGOT PASSWORD. QUESTION: I want to do standard validation in the facebox as I would in a "regular" browser window. The facebox loads, but as soon as I hit submit, the form loads again in a non-facebox window (the correct error shows, but it's in a regular browser window, not a facebox!). How do I keep facebox "lit" after submit?

Code:
<head>
   [removed]
    jQuery(document).ready(function($) {
      $('a[rel*=facebox]').facebox({
        loading_image : 'loading.gif',
        close_image   : 'closelabel.gif'
      })
    })
     $.facebox.settings.opacity = 0.35;
   [removed]
</head>

...

<a href="/login/password" rel="facebox">I forgot my password</a>

----
the function /login/password (function:password in controller:login) loads the FORGOT PASSWORD VIEW:

Code:
function password() {    
        $rules['email']    = "trim|required|valid_email|callback__password_check";
        $this->validation->set_rules($rules);
            
        if ($this->validation->run() == FALSE)
        {
            $data['title'] = 'Deals On Meals: Login';
            $this->load->view('login/password_form');
        }
        else
        {
                   $this->sendpassword();
        }
    }



FORGOT PASSWORD VIEW:
Code:
&lt;?php echo form_open('login/password'); ?&gt;
        <table id="popupLayout" style="border-collapse:separate;" cellspacing="5" align="center">
            <tr>
               <td class="formheader" colspan="2">Please enter your email address</td>
           </tr>
            
            <tr><td colspan="2">&lt;?php echo $this->validation->error_string; ?&gt;</td>
            </tr>
            <tr>
               <td height="33">Email</td>
               <td>&lt;input type="text" name="email" id="email"&gt;&lt;/td>
            </tr>    
                    <tr>
                       <td>&nbsp;</td>
                       <td>&lt;input class="login" type="submit" name="submit" value="Submit" /&gt;
                           &lt;input class="close"&gt;&lt;/td>
                    </tr>
                    <tr>
                        <td colspan="2" id="surveycodemessage"></td>
                    </tr>
        </table>
   &lt;?php form_close(); ?&gt;


Messages In This Thread
facebox form submission - by El Forum - 11-10-2008, 07:50 PM
facebox form submission - by El Forum - 11-10-2008, 09:08 PM
facebox form submission - by El Forum - 11-10-2008, 10:09 PM
facebox form submission - by El Forum - 11-11-2008, 10:13 AM
facebox form submission - by El Forum - 11-11-2008, 05:42 PM
facebox form submission - by El Forum - 11-12-2008, 08:09 AM
facebox form submission - by El Forum - 12-01-2008, 01:43 PM



Theme © iAndrew 2016 - Forum software by © MyBB