Permalink
Browse files

Made it possible to override the default generated id for a field fro…

…m the form yaml
  • Loading branch information...
1 parent fe2c954 commit c500c99807d94c308c5825455042a09c02aef2ba @rikh42 committed Feb 12, 2013
Showing with 5 additions and 0 deletions.
  1. +5 −0 form/type/AbstractType.php
@@ -305,6 +305,11 @@ public function getFullName()
*/
public function getId()
{
+ // If we have specified an id in the config, use that
+ if ($this->has('id')) {
+ return $this->get('id');
+ }
+
// If we don't have a parent, then my id is my name
if ($this->parent == null) {
return $this->getName();

0 comments on commit c500c99

Please sign in to comment.