Why not include with your message a link to the kind of form you’re
talking about, so we have a better idea of what you need?
It’s pretty simple to do stuff with tables. The easiest form is just
one that marches down the screen, one field per line. Remember, there
is no restriction on screen height for web forms.
This is what a one-field form with tables looks like:
Label |
<%= text_field(:table_name, :field_name) %> |
For more fields, just repeat the … pattern as many times
as you want.
Where it gets tricky is if you want to have more than one field on a
line. That can create messy table structures.
As the other respondant said, under no circumstances would I recommend
CSS positioning for something that naturally falls into a table. CSS
positioning is extremely difficult to get working properly. However,
you may want to style table cells with CSS, which is easy. Just say
td {
color: black;
background-color: #ffffcc;
border: black solid 1px;
padding: 3px;
}
(example as I've given earlier)
You can, of course, substitute whatever you like for the style.
Complex table layouts tend to be easier to design than they are to
read. Note that you can have as many table cells in a rows as you want
(and as can fix on the screen). So you could say:
(etc)
if you wanted the next line to be the whole width of the table, you
would say
Remember that you don’t want to reproduce the paper form as it looks on
paper. That will confuse people used to how web forms work. For
instance, I would strongly recommend that you stick to one field per
line, except for fields like first/last name and city/state/zip that
are traditionally grouped together. An example like what I have above,
with the sex to the right, is likely to confuse people because they
will be moving down the fields and are likely to miss the age entirely.
You may want to read Jakob Neilsen on web usability at
http://www.useit.com/ before designing your form. It has a lot of
information on making web sites and forms easier to use, and a lot of
research about how users really see things.
Hope that helps.
D
Name: |
<%= text_field :people, :first %> <%= text_field :people, :last
%> |
Sex |
(radio buttons for male/female) |
This is the whoel width of the line |