Skip to content

Instantly share code, notes, and snippets.

@Tocacar
Last active August 29, 2015 13:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Tocacar/9248219 to your computer and use it in GitHub Desktop.
Save Tocacar/9248219 to your computer and use it in GitHub Desktop.
/**
* Create and Edit
* @param \Sonata\AdminBundle\Form\FormMapper $formMapper
*
* @return void
*/
protected function configureFormFields(FormMapper $formMapper)
{
$formMapper
->with(
'My Entity Name',
array(
'description' => "Text added here is displayed onscreen above the form defined below.
<br /> You can even include html tags and they will render as expected, like this
break tag for example! I find this quite useful."
)
)
->add(
'dateStart',
'date',
array(
'widget' => 'single_text',
'format' => 'dd/MM/yyyy',
'empty_value' => ''
)
)
//more fields here
->end();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment