I'm having trouble making the change of error and its tag
class. Does anyone know how to do this change?
echo "<?php echo \$this->Form->create('{$modelClass}', array(
'inputDefaults' => array(
'div' => array('tag' => 'p'),
'error' => array(
'wrap' => 'span',
'class' => 'validate_error',
),
)
)
);?>\n";
return:
<p class="input text required error">
<label for="ContaReceberDsConta">Ds Conta</label>
<input name="data[ContaReceber][ds_conta]" maxlength="255"
type="text"
value="" id="ContaReceberDsConta" class="form-error"></p><div
class="error-message">notempty</div>
If you look will find that the error is out of the tag and the name
<p>
remains the same class generated by cake.
The correct return would be:
<p class="input text required error">
<label for="ContaReceberDsConta">Ds Conta</label>
<input name="data[ContaReceber][ds_conta]" maxlength="255"
type="text"
value="" id="ContaReceberDsConta" class="form-error">
<span class="validate_error">notempty</span>
</p>
Thank you!
--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
No comments:
Post a Comment