Question

Im trying to create a custom formatter in Symfony 1.4. I have embedded form via

$this->embedRelation('User','BasesfGuardUserAdminForm');

Is there a way to format the name of the embedded form 'User'?

Was it helpful?

Solution 3

I think this is most straight-forward! (and pretty obvious too!)

$this->embedForm('inner_form', new InnerForm());
$this->widgetSchema['inner_form']->setLabel('');

This will result in an empty label for the form!

OTHER TIPS

IIRC BasesfGuardUserAdminForm AS User.

I has the same issue, and when I replaced embedForm() by mergedForm() the errors became easy to manipulate.

foreach ( $answers as $a )
{
    $aForm = new QuestionAnswerForm($a);
    $this->mergeForm($aForm);
}


$this->widgetSchema->getFormFormatter()->setRowFormat('%field%%help%%hidden_fields%');
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top