SiT! Bugs - SiT!
View Issue Details
0000569SiT!otherpublic2009-03-12 19:572012-01-24 13:10
0000569: Framework to create forms
As discussed the other day we could do with a framework to create and process forms.

The thought was to use objects




Parent $item has generateHTML()

need a way for items to be required
No tags attached.
child of 0000613confirmed  Interface to add/edit themes 
Issue History
2009-03-12 19:57paulhNew Issue
2009-03-12 20:38kieranNote Added: 0000777
2009-03-13 08:01nicdevNote Added: 0000778
2009-03-16 10:36ivanNote Added: 0000783
2009-03-16 11:02kieranNote Added: 0000784
2009-03-16 11:39ivanNote Added: 0000785
2009-03-16 11:59kieranNote Added: 0000786
2009-08-02 20:00ivanRelationship addedparent of 0000613
2010-03-09 11:39ivanRelationship deletedparent of 0000613
2010-03-09 11:40ivanRelationship addedchild of 0000613
2010-04-26 21:00modirNote Added: 0003113
2012-01-24 13:10ivanNote Added: 0004423
2012-01-24 13:10ivanStatusnew => confirmed

2009-03-12 20:38   
As mentioned to Ivan, it might be worth using CakePHP's form helper code for this, it seems pointless re-inventing the wheel, it works pretty much exactly as you've said there.
2009-03-13 08:01   

Just a note from us as we have been looking at creating some plugins to do some forms for us, this framework will be very usefull :-)

We were discussing Cake as well..
2009-03-16 10:36   
CakePHP would be good so long as it meets all our needs, I don't want a repeat of the mess we made with Dojo, where it did lots that we didn't need really well, and not much that we did need not very well. if that makes sense.

I've never used Cake personally, I'd need to see it before making up my mind really, but my initial thoughts are that making forms is such a simple thing re-inventing the wheel to get the kind of wheel we're happy with would be preferable to having to mould SiT into something else.

We can't possibly change every form in one go, there are too many, so whatever solution we choose has to let us smoothly migrate from current to new. That might not be so easy with CakePHP if it doesn't let us make new forms look like old ones.
2009-03-16 11:02   
If we did use cake, we'd only use the form helper file, so there wouldn't be a dojo situation again. We need to have a look at it but I think if we needed to make changes, it'd be better doing it to cake's code rather than writing our own.
2009-03-16 11:39   
Not trying to be argumentative, this is a genuine question coz I don't know cake. When you say 'better' what do you mean? What do we get out of it?
2009-03-16 11:59   
It's just speculation, but I'd have thought that cake would have put more thought into making their framework more robust and flexible that we could possibly make ours. We could probably make ours simpler, but we might need that flexibility in the future. People using cake don't hand-code their forms so logically, it should work for 99% of forms.
2010-04-26 21:00   
I already made several projects with CakePHP, ZendFramework and CodeIgniter. And from my experience I can tell you that it would be a lot easier to take the Zend Form component. In the quick-start tutorial you can see how it is working there: [^]

As you can see it is pretty similar to CakePHP. The positive thing with ZendFramework is that it is a lot easier to use only one component. You are not forced to use the full framework.
2012-01-24 13:10   
We have agreed that we need some sort of framework but we've not quite settled on what. PaulH has started work on a new framework but we're probably not ready to use this on new forms until it's had a bit more work.