News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

FinalConcept.com.au:
Symfony Unbound sfForm Unexpected extra form field named
June 29, 2010 @ 11:13:21

In a recent post to the FinalConcept blog there's a helpful hint for Symfony developers looking to be rid of a pesky "unexpected form field" error that might pop up - finxing it with a validator.

In this use case we have an exiting model that describes an Article. We want to be able edit the Article and have the option to send and email to an address defined in a text box. However we don't want the email field to be bound to the form and we dont want to add the email address to the Article.

The trick is to add a validator to the form's definition (like a normal field) but to include a "sfValidatorPass" into the validatorSchema and it'll skip right over it. You can find out more about Symfony forms on the Symfony project website.

0 comments voice your opinion now!
symfony form error unbound sfform


blog comments powered by Disqus

Similar Posts

FinalConcept.com.au: Symfony: Unbound sfForm: Unexpected extra form field named

Ruzz on Symfony: What is this all about?

NETTUTS.com: Are You Making These 10 PHP Mistakes?

Pierre-Alain Joye's Blog: Howto use a single php.ini for cli/cgi with htscanner, use 0.7.0 or later

DevShed.com: The Singleton and Factory Patterns in PHP - Working With Singletons


Community Events

Don't see your event here?
Let us know!


part2 laravel interview community podcast language install performance conference api configure symfony2 introduction application release series php7 example framework opinion

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework