/** * Returns the name (ID) for the element. * In some cases the FieldGroup doesn't have a title, but we still want * the ID / name to be set. This code, generates the ID from the nested children * * TODO this is temporary, and should be removed when FormTemplateHelper is updated to handle ID * for CompositeFields with no name */ public function getName() { if ($this->name) { return $this->name; } if (!$this->title) { return parent::getName(); } return preg_replace("/[^a-zA-Z0-9]+/", "", $this->title); }