0
這是錯誤我得到:提供給逃生幫手ZF2主義editaction - 不允許遞歸
對象,但標誌不允許遞歸
<script type="text/javascript">
$(document).ready(function(){
$("#datadocarro").datepicker({
changeMonth:true,
changeYear:true,
yearRange:"-100:+100",
dateFormat:"dd MM yy"
});
$("#inspecao").datepicker({
changeMonth:true,
changeYear:true,
yearRange:"-100:+100",
dateFormat:"dd MM yy"
});
});
</script>
<dt><?php echo $this->formLabel($form->get('datadocarro')); ?></dt>
<dd><?php
// the error is hapening here
echo $this->formElement($form->get('datadocarro'));
echo $this->formElementErrors($form->get('datadocarro'));
?></dd>
在附加動作,我有在視圖上相同的代碼,並在編輯動作視圖我得到的錯誤工作
現在的工作沒有錯誤 但JQ uery日期選擇器不工作
<dt><?php
$ytestevq=$form->get('datadocarro');
$datecarroElement = new Zend\Form\Element\Date('datadocarro');
$datadocarrov=$form->get('datadocarro')->getValue()->format('Y-m-d');
echo $this->formLabel($form->get('datadocarro')); ?></dt>
<dd><?php
echo $this->formElement($datecarroElement->setValue($form->get('datadocarro')->getValue()->format('Y-m-d')));
echo $this->formElementErrors($datecarroElement);
?></dd>
表單代碼
$this->add(array(
'name' => 'datadocarro',
'attributes' => array(
'type' => 'Date',
'required' => 'required',
'class' => 'demoHeaders',
'id' => 'datadocarro',
),
'options' => array(
'label' => _('Car Date'),
),
));