开发者

creating multicolumn forms

I am planning to build a multicolumn form with atleast 5 to 6 fields.

What would be the best approach of doing this usin开发者_运维知识库g CSS floats? or using tables with css. Since the form is going to be pretty long atleast around 50 rows. It could have check boxes, radio , just text and input boxes. Any sample or examples out there? or any tools that can be used to make it on the fly( not looking for dream weaver or of similiar type)

here is the sample layout of the form how it going to be:

Fieldname1 ,Fieldname2 ,Fieldname3 ,Fieldname4 ,Fieldname5
inputbox1(checkbox),  text,  inputbox3, inputbox4, inputbox5 

Thanks


If you're generating the page dynamically, it's easy to use libraries to generate the form algorithmically from within the programming language you're using. For example, deform in Python. This basically saves you the trouble of writing fifty rows' worth of HTML on your own.

Alternately, you can use a JavaScript library like jQuery to add rows within the user interface (with a button like "add another entry").

You can use tables or CSS; your decision here doesn't really matter. Tables are going to be less complex conceptually, and so would be my first choice, but if you want to add rows dynamically, different browsers can behave unpredictably because tables don't always behave nicely when you manipulate them after the initial page load.


separate the columns in <fieldset> tags then give them a fixed width and float them.

Here is an example:

HTML

 <form>
     <fieldset>
         <input />
         <input />
     </fieldset>
     <fieldset>
         <input />
         <input />
     </fieldset>
 </form>

CSS

form { width:100% }
fieldset { width:25%; float:left }


I think, you need some program, that will help you to build a personalized form.

Try php forms, it will be easy for you to work in this program because it has a video, that fully describes the process of form creation.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜