More inspiration for forms

I’ve come across another form implementation that impressed me. “SmartForms”:http://www.roadsend.com/siteManager/siteManager_HTML/x1201.html from the “Roadsend SiteManager”:http://www.roadsend.com/siteManager seems to have many good features. I like the specific form templates idea in particular, as this is half-way to what I want to achieve. If SmartForms was available as a stand-alone library (which as far as I know it isn’t) then I’d consider using it at the present time (at least until I’ve developed something that pleases me more).

Jim (one of the owners of “FluidHosting (http://www.fluidhosting.com/)”:http://www.shareasale.com/r.cfm?B=8239&U=71070&M=2791, the company where I host) also has a nifty form generation class that has very good multipage form support - unfortunately he hasn’t shared the code!

I can see why these two libraries are good, but I want to implement something that will work with an already existing XHTML(eXtensible HypterText Markup Language) form, rather than generating the form+table (or form and then assigning into a template). For projects where you want to generate the forms programmatically, such as those where you are building forms to edit database records, yes, I think these form _generation_ libraries are excellent solutions. But for smaller sites, where you have only a set number of forms and can design each by hand, or sites where a designer wants to have full visual control, I don’t think the traditional approach is the best. Yes, the “SmartForms”:http://www.roadsend.com/siteManager/siteManager_HTML/x1201.html Form Templates give the designer much more control, but not full visual editing capabilities of the form elements. Want to tweak the class attributes, and see the changes in place? Try doing that with any traditional solution using normal designer tools (such as “Dreamweaver (not recommended)”:http://www.macromedia.com/dreamweaver/ or “TopStyle (recommended)”:http://www.bradsoft.com/).

I still have parts of my solution to think out. For example, with pure XHTML(eXtensible HypterText Markup Language) forms, how am I going to populate a select box with options from a database? I think this can be done in the PHP script using the XML functions, but without putting any *logic attributes* in the XHTML(eXtensible HypterText Markup Language) form? For indeed, that is my goal. I want to make a more complete separation than “Simon Willison”:http://simon.incutio.com/archive/2003/06/17/theHolyGrail achieved. This involves a separate file holding the logic for the form. Eventually this will be XML (but should it be SML(Simple Markup Language - a simplified form of XML with more tags but no attributes) or XML–you advise!) but for now I’m using an array to save me writing a processor at this time. Current trials are going OK, but learning how to write PHP code for SAX processing is taking me a while - figuring out how to replace self-closed tags with new content took a while (and I’ve not mastered it yet - the way I did it for hidden inputs seems to be very clunky)

That’s enough writing for this evening - maybe I’ll get more coding done tomorrow :-) And I will post some code… eventually.

0 comments ↓

There are no comments yet...Kick things off by filling out the form below.

Leave a Comment