0
這是裝飾代碼HTML結果與上述裝飾兩個輸入元素的如何裝飾錯誤消息
$mydecorate = array(
'ViewHelper',
array('Errors', array('placement' => 'append','class' => 'error')),
array('Label', array('separator' => '')),
array('HtmlTag', array('tag' => 'p', 'class' => 'element-form'))
);
:
<p class="element-form">
<label for="firstname" class="required">First Name:</label>
<input name="firstname" id="firstname" value="" type="text">
</p><ul class="error"><li>required field!</li></ul>
<p class="element-form">
<label for="lastname" class="required">Last Name:</label>
<input name="lastname" id="lastname" value="" type="text">
</p><ul class="error"><li>required field!</li></ul>
我想的錯誤消息被放在裏面p.element-form標籤, 任何想法請求?
謝謝