Hey guys! First, I love the new form framework, and find myself going on and on about it here during the Nashville community conference to people that never even asked about it. In documenting the framework, I've got some feedback and questions. These is probably mostly for Bernhard, but I wanted to open it up to everyone:
Required Attribute -------------------------- I'm not sure about having the "required" option defaulting to true. My fear is that developers - using non HTML5 browsers - will unknowingly have a bunch of required fields. I think the developer should have to turn this on manually. Also, in the current state, is required guessed from validation? Does that only work if you use field guessing, or if I specify my field will it still try to default my required option based on validation metadata? Random ------------ * Is it possible to "embed" another form type without creating a form type class? For example, I can easily build a form right in a controller - but can I build a subform in a controller and then embed it into my main form? * Is it only possible to set a form theme (in an actual template) in Twig? I don't see a way in PHP - I'm guessing you can still override things globally (still needs to be doc'ed in a cookbook) Form Type Questions -------------------------------- * On the collection field, modifable=true seems to be what's necessary to output the $$name$$ field, but it doesn't actually seem to bind to the objects unless modifiable=false. I know it's used in the AcmePizzaBundle, but I'm not clear on how this stuff is supposed to work. Someone will need to bootstrap a good cookbook article on this topic - I'm happy to do it once I've got my mind wrapped around it. * What is the "FormType" used for? In the AcmePizza, you extend AbstractType, whose parent is FormType. So, what's the difference between FormType and AbstractType? Just a little pointer here will go a long way * Is it intentional that the "preferred_choices" in the ChoiceType does not work when expanded=true? * For the ChoiceType, you have to set required=false to get an "empty" option at the top of your select field. That seems wrong - I can have a required select menu, but I don't want to auto-select the first option for the user. I think these should be separated - and driven entirely by the presence/absence of the user passing in an "empty_value" option to the form helper * What's the point of the "value" option for a checkbox? It always resolves to true/false regardless of the value (which is correct). Is the value option necessary for when other fields use the checkbox type (e.g. the choice type) * The timezone options display kinda sucks - I'd rather see (GMT+7) America/Chicago or something similar. Is this possible or is there more to the problem? * The "integer" type on on the percent type seems strange. It means that I can't store a "55.5" value on my object and use it - it's changes to 56 when output to the user. And when the user submits "55.5", the pure decimal value sticks to the object * The "%" signin the percent type template should perhaps be toggleable * What is the use-case for the "divisor" option in the money type? * The language codes are a mixture of 2-letter and 3-letter - what standard is that? Reading wikipedea (http://en.wikipedia.org/wiki/ISO_639), the standards were either 2 letters or 3 letters, but the languages output are a mix? I believe this comes straight out of PHP itself - I'm just wondering what the proper way to describe it is * The file type is either broken, or I'm confused :). First, it seems to force the value of the given field to be an absolute path to a real file (e.g. can't just be foo.jpg), else it throws an exception. Also, on submitting a file field, I got an error about something needing to be a File class when it was an array. I'm happy to give more information - more looking for a big picture on this right now. We'll need a cookbook article on this topic. Thanks! Ryan Weaver US Office Head & Trainer - KnpLabs - Nashville, TN http://www.knplabs.com <http://www.knplabs.com/en> http://www.thatsquality.com Twitter: @weaverryan -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/symfony-devs?hl=en
