Nov15

Symfony 1.1 new form handling

When looking at the list of symfony features missing, I think that form
handling is the top one.

The current form handling ( form creation process , form validation process etc… ) works fine, but it’s not at the same level of all the others parts of Symfony.

Fabien is working hard over this part of the new framework from June, when he wrote in a post that was looking for the best approach.
He wrote too that he was developing a solution similar to FormEncode ( a Python library).

The 09 November Fabien committed in Subversion repository a lot of widget classes and the 12 November he wrote in that post that is still missing the most important piece of this new form handling system: sfForm.

He wrote: “This class will be the class most people will interact with to use forms
/validation in the action and display the form in the template.

The new Symfony form handling system will use the widget concept.
A Widget is a component that improves the whole handling process:

* Defining which fields the form has
* Injecting Javascript and CSS for a field if necessary
* Defining which kind of input each field expects
* Wrapping the fields into a form
* Displaying the form
* Validating form input
* Displaying validation errors and re-displaying user input

In Symfony 1.1 we’ll be able to define a form in the same way we define a database schema and we’ll have a lot of “ready to use” widgets like sfWidgetFormInputCheckbox, sfWidgetFormInput, sfWidgetFormInputPassword and we gonna use decorators for html, javascript and css form render.

Symfony 1.1 form handling will be at the same level of the rest of the Framework.

I think that, like ever, Fabien is following the right way.


12 Responses to “Symfony 1.1 new form handling”

You can leave a response, or trackback from your own site.

  1. Nov16

    tripats

    Said this at 2:55pm:

    Oh yes,
    that sounds like really good news to me because I spend a couple of hours in my new project in handling slighly more complicated forms. Espacially the repopulation of checkboxes and so on was kind a of pain in the ass. The approaches in the documentation didn’t work out of the box or maybe I did understood something wrong but actually got it working with a mashup of code from the docu and fragments from the askeet engine. It works but I am not very happy about how long it took…. but after all symfony is always worth to try and go on but building new models is so easy and fast and it is good to know that the project is constantly evolving.
    Cheers, trip

  2. Nov18

    Johannes Thönes

    Said this at 6:39pm:

    Hello,

    this sounds just wonderful. I’m currently working on an - i have to admit - very specific form of web application, which does contain only forms (well it’s main purpose ist to collect data for a pdf letter generated).

    So I very much look forward to the new feature.
    Would it be wise to use the feature by now for a productive webapp?

    Greetz
    Johannes

  3. Nov19

    rpsblog.com » A week of symfony #46 (12->18 november 2007)

    Said this at 2:40pm:

    Symfony 1.1 will be a little revolution…

  4. Nov21

    admin

    Said this at 11:44pm:

    I think it would be early…

    I will wait Symfony 1.1 release before use that features in a productive environment.

    Best Regards.
    Sorry for the delayed reply.

    Mauro Casula.

  5. Nov22

    Daniel

    Said this at 8:05pm:

    I couldn’t understand some parts of this article 1.1 new form handling | Symfony-framework.com, but I guess I just need to check some more resources regarding this, because it sounds interesting.

  6. Nov23

    admin

    Said this at 10:11am:

    What the problem with that article?

    Is my english so bad?

    Or what?

    I would like to know why you cannot undestand my article..
    If the problem is my english, can you please write me the parts you cant undestand?

    Waiting for your response.
    Best Regards and thanks for your comment.

    ps. very soon I will write another post about Symfony 1.1 new features.

    Mauro Casula.
    Symfony-Framework.com

  7. Nov23

    Celso

    Said this at 8:35pm:

    hi,

    is there an form example?

    thanks

  8. Dec3

    Symfony.es » Blog Archive » Una semana con Symfony #19 (12 - 18 noviembre 2007)

    Said this at 11:30am:

    […] Symfony 1.1 new form handling […]

  9. Dec19

    Keith

    Said this at 6:36pm:

    I fail to see how the new way of handling forms is better than the old way.

    You shouldn’t have designers going in and setting variables on form field lengths, etc. inside the application. They should be able to deal with all of this via the view.

    I’m very skeptical of what the wider critical view of this will be. It is dangerously close to blurring the differences between M, V, and C which seems foolish.

  10. Dec31

    Elliott

    Said this at 6:34am:

    http://redotheweb.com/2007/12/21/sfforms-the-missing-component/

  11. Apr8

    Html Forms

    Said this at 1:49pm:

    Good site I “Stumbledupon” it today and gave it a stumble for you.. looking forward to seeing what else you have..later

  12. Oct8

    Mundi

    Said this at 6:35pm:

    After working with the new form methodology for a bit, I feel the project is suffering from code wrapper-itis. With the new framework, there are many new objects, wrappers, methods to learn that all come down to accomplishing one thing… rendering a form to the web browser. But after doing a bit of searching around the web, I discovered there is a competing technology that allows coders to render forms, perhaps you may of heard of it… It is called HTML Amazingly, it has been around for a long time.

 

Leave a Reply

 

Recent Posts

Popular Categories

No categories

About

We are a group of programmers with the passion of Object Oriented Programming and PHP5… We hope to help the Symfony comunity to grow, we hope to help Php programmers to switch to MVC world and we wish you can find in this blog all you answers… Welcome to Symfony-Framework.com.

<<The Administrators>>