Zend form bootstrap annotation datepicker “Object provided to Escape helper, but flags do not allow recursion”

前端 未结 4 845
失恋的感觉
失恋的感觉 2021-01-24 07:04

I\'m using Zend framework with Bootstrap and ReverseForm adapter, and have an interesting problem with it: when I use Bootstrap Datepicker in Zend Form I\'ve the next exception:

4条回答
  •  走了就别回头了
    2021-01-24 07:46

    No the mistake apparently came from your code or maybe the point is you have to do if is an editAction not just bind but add:

    $form->bind($document);
    $form->get('datenais')->setValue($document->getDatenais()->format('Y-m-d'));
    

    I know not the clean way but it will solve your problem. If your find another way i'll glad to see your piece of code.

提交回复
热议问题