Template thoughts concerning forms - please comment

Ok, as folks know, I've been stuck for a bit on the whole template engine because I wasn't sure how to handle forms. I think I have a solution and I'd like feedback.

Consider the Add Comment process. In core BlogCFC, this involves launching a popup window. You enter your comment, save it, and the popup closes and the main window reloads. Other folks have modified this. They either use a comment form on the page itself, or they do it but hide the form display with JavaScript.

My thinking is this. While I can see folks wanting control over how the form shows up, and control over the fonts used in the form, I can't see them wanting control over the layout of the fields. So for example, the first fields asks for your name, the second your email address, and so on. I don't think folks would care to switch email and website.

So to handle the comment form, your template will simply use a token like so: %commentform%. That one tag will be replaced with the form. It will also handle displaying the errors. The output will be standardized, so you know exactly what CSS to modify if you want different fonts. This means you can change the basic layout, like padding, etc. You just wouldn't be able to change the order of stuff. Or change that errors show on top. I think this is a fine compromise. The only detail I'm a bit unsure of is how to handle success. Right now on success we do: reload opener, close window. But for folks who want a different type of 'Add Comment' logic, I'll need to think I'm a bit more. I may just use one more file for comment completion. This file would be run when stuff is done.

Anyway - thoughts please? This was the last thing holding me up before I wrapped the prototype.

Jake Munson's Gravatar Sounds like a good plan to me. But I don't change anything with the add comment stuff today, so I'm not going to be too picky about how you do it. Hopefully some of those other guys will comment...
# Posted By Jake Munson | 12/8/07 11:11 AM
Tony Garcia's Gravatar I think your proposal sounds fine. I think most people would be happy if they can control the "look" (i.e. fonts, colors, padding, borders, etc.) and wouldn't care too much about things like the order of the form elements.
# Posted By Tony Garcia | 12/13/07 3:48 AM
Roger Skalbeck's Gravatar To me, this sounds like a good compromise. I can't foresee needing to reorder fields, nor do I need that level of control. I like consistent typography though, so CSS control is enough for me.
Though it's not directly your question, here's my thought on how the form might work: To me, it would be nice to have an add comment form appear on the same page such as with an iFrame (for instance). That way the default is that you can see other comments while drafting your own.
# Posted By Roger Skalbeck | 12/17/07 9:05 AM
Jean-Michel Godin-Duguay's Gravatar Not really related but I would be glad to see multilangual support added...
# Posted By Jean-Michel Godin-Duguay | 1/2/08 12:53 PM
Jean-Michel Godin-Duguay's Gravatar Nevermind my last comment, I guess I didn't go trought the whole documentation the first time.
# Posted By Jean-Michel Godin-Duguay | 1/13/08 6:22 AM
Vectorpedia (Rick)'s Gravatar I would add the comment form on the page itself.........no pop-up
# Posted By Vectorpedia (Rick) | 2/4/08 10:21 AM
Adam Tuttle's Gravatar I agree that the popup is not preferable, but it sounds like you're writing this in a way that we'll be able to choose to have the comment form inline -or- in the popup when we create a page template. (Is that correct?)
# Posted By Adam Tuttle | 2/8/08 3:41 AM
Raymond Camden's Gravatar In theory - yes.
# Posted By Raymond Camden | 2/8/08 3:43 AM
Matt's Gravatar Def. better without the popup.
In some of my blogs i've used the mootools Fx.Slide function

var mySlide1 = new Fx.Slide('comment1');
$('toggle1').addEvent('click', function(e){
   e = new Event(e);


Then the comments box appears but it's hidden until someone clicks "add comment".
# Posted By Matt | 2/18/08 6:25 AM
Haio's Gravatar Is there really no formatting in this cfc?
# Posted By Haio | 7/23/08 11:26 PM
Raymond Camden's Gravatar Your question doesn't make sense.
# Posted By Raymond Camden | 7/24/08 3:28 AM
BlogCFC was created by Raymond Camden. This blog is running version 5.9.2. Contact Blog Owner