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

前端 未结 4 853
失恋的感觉
失恋的感觉 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:41

    Its a similar issue to the one you get if you do not add the type field to the Zend Form:

    'type' => 'Zend\Form\Element\Time',
    

    The whole element is as such::

       $this->add(array(
        'name' => 'officialDrawTime',
            'type' => 'Zend\Form\Element\Time',
            'attributes' => array(
                'required' => 'required',
                'type'   => 'time',
                'class' => 'form-control input-large',
                'placeholder' => 'e.g 19:30 or 07:30 (24 hour clock)',
                'pattern' => '^[0-9]{2}:[0-9]{2}$'
            ),
            'options' => array(
                'label' => 'Official draw time',
                'instructions' => 'The official draw time...)'
            ),
        ));
    

提交回复
热议问题