Page 1 of 1

Designing a web site in parts

Posted: Thu Apr 05, 2007 5:50 pm
by alex.barylski
I need to include a FORM builder into my existing site layout. The way I see it I have two options:

1) I create a seperate script which uses the Smarty template which powers my site layout
2) I find a FORM builder which opens in a popup window and no theming is applied

The former appeals to me but the idea of creating another script is a PITA. The latter would let me drop in the FORM builder and start immediately. I've considered building a FORM builder myself but struggle with the above problem of integration into my existing CMS or other third party CMS systems.

I like keeping my directory(s) clean as possible using DB and mod_rewrite, so adding a script to pull on the template and deliver the generated FORM isn't ideal but neither is using a popup and hosting the script on an external server.

Assuming I've made some sense, how do you handle these situations? Which would you prefer and why?

Posted: Fri Apr 06, 2007 9:03 am
by Chris Corbyn
I build my own forms with HTML. It's far easier to change the look and feel of the form in the template this way (especially if you're going to have a designer work on the same code). With some CSS to pretty things up a bit, forms are pretty quick to write. You'll probably spend longer finding one that fits all your requirements than it would take to just write the stuff yourself.

Posted: Fri Apr 06, 2007 11:13 am
by Todd_Z
It depends how "cookie cutter" you want your forms to be. If its a question of simply inputs, selects, etc, it shouldn't be so bad. But once you get complicated with the types of inputs you have, for examples auto completes, calendars, etc, a class to deal with that stuff becomes less realistic. If its a complicated form, write the html. Else, make yourself a nice little form, and form_element class.

Posted: Fri Apr 06, 2007 11:23 am
by Chris Corbyn
symfony has helpers, but it won't just do it all for you:

http://www.symfony-project.com/book/trunk/10-Forms

Posted: Fri Apr 06, 2007 11:42 am
by RobertGonzalez
Make your forms like you make your XHTML.... custom. Then style them and apply code to them as needed for effect.

I usually code my own forms. I typically use the HTML elements associted with forms (fieldsets, legends, labels, etc) and assigne them id's and classes as needed so I can interface with them in JS or CSS.