• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Two form on Same Page

#9
[eluser]Yash[/eluser]
Now My two different views
I've created first normal CI form then switch to this one ..even it's not working

Code:
<form action="<?=site_url();?>blog/do_search" method="post" name="search" id="search">
  
  <p>
    &lt;input type="text" name="blog_search" id="blog_search" /&gt;
  </p>
  <p>
    <select name="search_area" id="search_area">
      <option value="post" selected="selected">In Posts</option>
      <option value="page">In Pages</option>
      <option value="pag">In Tags</option>
    </select>
    &lt;input type="submit" name="search" id="search" value="Search" /&gt;
  </p>
&lt;/form&gt;

Another view forgetpassword

Code:
&lt;?php

echo '<div id="error" >'.$this->validation->error_string.'</div>';
                  
    $attributes = array('class' => 'forgetpassword', 'id' => 'forgetpassword');
    
    echo form_open('users/ForgetPassword', $attributes);
    echo form_hidden('form', true);
    
    
    $username = array(
                  'name'        => 'username',
                  'id'          => 'username',
                  'value'       => $this->validation->username,
                  'size'        => '50',
                  'class'       => 'input',
                );
                
    $email = array(
                  'name'        => 'email',
                  'id'          => 'email',
                  'value'       => $this->validation->email,
                  'size'        => '50',
                  'class'       => 'input',
                );
                                        
    
    
        $tmpl = array (
                    'table_open'          => '<table border="0" cellpadding="4" cellspacing="4"><caption>Forget Password</caption>',

                    'heading_row_start'   => '<tr>',
                    'heading_row_end'     => '</tr>',
                    'heading_cell_start'  => '<th>',
                    'heading_cell_end'    => '</th>',

                    'row_start'           => '<tr>',
                    'row_end'             => '</tr>',
                    'cell_start'          => '<td>',
                    'cell_end'            => '</td>',

                    'row_alt_start'       => '<tr>',
                    'row_alt_end'         => '</tr>',
                    'cell_alt_start'      => '<td>',
                    'cell_alt_end'        => '</td>',

                    'table_close'         => '<tfoot><tr><td>&nbsp;</td><td>&nbsp;</td></tfoot></table>'
              );

    $this->table->set_template($tmpl);
    
    //$this->table->add_row('Username',form_input($username));
    //$this->table->add_row("",form_submit("forgetpassword", "Get it back!"));
    //$this->table->add_row("","");
    //$this->table->add_row("","<h3>OR</h3>");
    //$this->table->add_row("","");
    $this->table->add_row('email',form_input($email));
    $this->table->add_row("",form_submit("forgetpassword", "Get it back!"));
    

    echo $this->table->generate();
    
    
?&gt;

now whenever I press for search it opens forgetpassword function and not the do_search function

I don't what is my problem

Sorry not to follow any naming convention


Messages In This Thread
Two form on Same Page - by El Forum - 07-31-2008, 03:43 AM
Two form on Same Page - by El Forum - 07-31-2008, 03:50 AM
Two form on Same Page - by El Forum - 07-31-2008, 03:57 AM
Two form on Same Page - by El Forum - 07-31-2008, 04:30 AM
Two form on Same Page - by El Forum - 07-31-2008, 04:37 AM
Two form on Same Page - by El Forum - 07-31-2008, 04:38 AM
Two form on Same Page - by El Forum - 07-31-2008, 04:40 AM
Two form on Same Page - by El Forum - 07-31-2008, 04:45 AM
Two form on Same Page - by El Forum - 07-31-2008, 04:45 AM
Two form on Same Page - by El Forum - 07-31-2008, 05:01 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.