Reputation: 104
I have written this form builder form
$document = new Document();
$form = $this->createFormBuilder($document)
->add('name', 'entity', array(
'class' => 'ActionaidLrpBundle:Lrp',
'property' => 'location',
'required' => false,
'empty_value' => 'Select Your Location',
'empty_data' => null,
'query_builder' => function(EntityRepository $er){
return $er->createQueryBuilder('u')
->where("u.status = 'active'");
},
))
->add('createdDate', 'date', array(
'input' => 'datetime',
'widget' => 'single_text',
'attr' => array('class'=>'calendar', 'read_only' => true)
))
->add('file')
->add('lrpId', 'entity', array(
'class' => 'ActionaidLrpBundle:Lrp',
'property' => 'getLrpIdAndName',
'required' => false,
'empty_value' => 'Select Your LRP',
'empty_data' => null,
'query_builder' => function(EntityRepository $er){
return $er->createQueryBuilder('u')
->where("u.status = 'active'");
},
))
->add('Import', 'submit')
->getForm();
the form show perfectly for all browser but the calendar not show in firefox browser. It works perfectly on Google Chrome browser. Please anybody help and advance thanks for giving any help.
Upvotes: 1
Views: 726
Reputation: 1283
firefox dosent show the input calendar as in chrome but you can try this solution : https://stackoverflow.com/a/22987203/4233170
Upvotes: 1