I’d like to make a table which one column is the is the login and the other is the sign up
using pure html it is something like
<table id="logIn-signIn">
<tr>
<td class="hd">LOGIN :</td>
<td class="hd">SIGN-UP :</td>
</tr>
<tr>
<td>
Email :
<input type="text" name="email" value="Email" />
</td>
<td>
First name :
<input type="text" name="firstName" value="First name"/>
</td>
</tr>
<tr>
<td>
Password :
<input type="text" name="password" value="Password"/>
</td>
<td>
Family name :
<input type="text" name="familytName" value="Family name"/>
</td>
</tr>
<tr>
<td></td>
</tr>
<tr>
<td></td>
<td>
Email :
<input type="text" name="email" value="Email" />
</td>
</tr>
<tr>
<td></td>
<td>
Password :
<input type="text" name="email" value="Choose a password" />
</td>
</tr>
</table>
The problem is that each column will use different fields (one for logging in and one for sign up) so each needs different form_for – one for new users and one for new session
Since the html table structure goes by rows and not columns, I can’t separate the form_for blocks..
How would I use 2 different form_for blocks inside 1 table?
thanks
NOTE: as the commenters have pointed out, using
divsandcssmakes this easier, but I assume you really need to usetablesfor some reason.Use a nested table layout.
The outer table is for the structure – it will have one row and two columns. Inside the left cell, build a table for just the login form, and in the right cell, build a table for the sign up form. The
form_fortags will be outside of the nested tables, but inside the cell of the layout table.