php - 'Invalid' error for sfWidgetFormChoice when form is submitted -


I want to display a combo box using symfony I have created the widget in CountryForm.php:

$ The-> setWidgets (array ('country' => new sfWidgetFormChoice (array ('option' => array ()));

For this verifier:

$ This-> setValidators (Array ('country' => new sfValidatorChoice (array ('option' => array (array_keys ($ country))))));

Let me invalid for this Cambodia Is getting an error. Is there any idea on this? Thanks in advance ..

array_keys gives an array try:

  $ this-> setValidators (array ('country' = & gt; ; New sfValidatorChoice (array ('option' = & gt; array_kiz ($ country)));  

Comments

Popular posts from this blog

paypal - How to know the URL referrer in PHP? -

oauth - Facebook OAuth2 Logout does not remove fb_ cookie -

wpf - Line breaks and indenting for the XAML of a saved FlowDocument? -