> I posted this last week, and I am still having a problem with getting HTML integrated with my form. I am setting the escape value to false, but it still doesn't seem to render the HTML for the label, for example, I have this element in my form:
>
> $this->addElement('select','types', array(
> 'label' => '<span>font: 14pt Frutiger LT Std;color:#00B3FF;><b>What type of home do you live in:</b></span><br/>',
> 'escape' => false,
> 'required' => true,
> 'multiOptions' => array( 'Existing Home' => 'Existing Home', 'New Construction' => 'New Construction', 'Condominium' => 'Condominium', 'Apartment' => 'Apartment',),));
>
> I'm not quite sure what I am missing, but I can't seem to render HTML for the label. Is there something else I need to add to my form class?
From what I can see, you're missing some knowledge about (X)HTML and CSS in the first place. What you're attempting to do there - apart from the fact that your (X)HTML it won't validate, let alone that rarely anyone will have the font available - is not considered good practice (separate structure from presentation.
Maybe that's why your question remains unanswered.
Best regards,
Andreas
没有评论:
发表评论