Add Form In Every Row with table helper Codeigniter

Posted by wibi on Stack Overflow See other posts from Stack Overflow or by wibi
Published on 2012-12-15T04:31:24Z Indexed on 2012/12/15 5:04 UTC
Read the original article Hit count: 146

Filed under:
|

Hi i am creating table using table helper, but in every row i want to add form, in html like this :

<table>
  <form action="">
  <tr>
    <td><input type="text" name="name2"></td>
  </tr>
  </form>

  <form action="">
  <tr>
    <td><input type="text" name="name2"></td>
  </tr>
  </form>
</table>

But i want in table helper: I have tried this one:

    $this->table->add_row(
                form_open('myAction').
                form_input('name'.$i),
                form_submit('Submit')
                form_close()
        );

And I use firebugs to inspect element produces, like this:

   <table>
     <tr>
       <form action="myAction">
         <td><input type="text" name="name1"></td>
       </form>
          <td><input type="submit"></td>
      </tr>
  </table>

why tag doesn't show at the last tag , but show at the first tag .

Thanks

© Stack Overflow or respective owner

Related posts about php

Related posts about codeigniter