Symfony 1.4: Widget Does Not Exist Error after Unset

   Posted February 1, 2011 by David Kirk in Symfony

With symfony’s form builder, users will need to unset several common fields such as created_at and updated_at. Beginners frequently experience a “widget does not exist” error after unsetting form fields.

To remove fields from symfony’s forms, coders will unset the fields in the form files found in the /lib/form/doctrine/ directory. After unsetting these fields, beginners are perplexed by the errors stating that the removed widgets do not exist.

The problem is not in the unset of the fields. That has likely occurred correctly. The error you are seeing is because symfony is still trying to render those fields that you just unset.

To fix this you need to remove references to these widgets. These are frequently found in your _form.php file.

 

About David Kirk

David Kirk is one of the original founders of tech-recipes and is currently serving as editor-in-chief. Not only has he been crafting tutorials for over ten years, but in his other life he also enjoys taking care of critically ill patients as an ICU physician.
View more articles by David Kirk

The Conversation

Follow the reactions below and share your own thoughts.

  • Samrat

    Thanks a lot!

  • Borat

    thanks

  • Кирилл

    Thank you very much!!!