On 17-03-2010 at 16:21:20 Levi Stanley <l...@eneservices.com> wrote:

<label tal:attributes="class php: (isset(error) &&
error['first_name'])?'labelbox error':'labelbox'">First Name:</label>


Is there a better way to do this?

function phptal_tales_erorrclass($fieldname, $nothrow)
{
return phptal_tales('true:error/'.$fieldname, $nothrow)." ? 'error' : NULL";
}

<label class="${errorclass:first_name} labelbox">

--
regards, Kornel

_______________________________________________
PHPTAL mailing list
PHPTAL@lists.motion-twin.com
http://lists.motion-twin.com/mailman/listinfo/phptal

Reply via email to