Hi Keith and Thomas,
Keith is right, there isnt any way to set the class in <legend>, so I
just use Thomas tips and wrap it with <div>. thank a lot guys !
- Ari -
On Mar 26, 2009, at 10:07 PM, keith Pope wrote:
Someone correct me if this is wrong :)
Looking at the Fieldset view helper there does not seem to be a way to
set the class:
// get legend
$legend = '';
if (isset($attribs['legend'])) {
$legendString = trim($attribs['legend']);
if (!empty($legendString)) {
$legend = '<legend>'
. (($escape) ?
$this->view->escape($legendString) : $legendString)
. '</legend>' . PHP_EOL;
}
unset($attribs['legend']);
}
As you can see no attributes are set on the legend, only the inner
text is set.
I would use CSS instead and target the fieldsets legend tag like that.
Hope this helps :)
2009/3/26 ariawan <[email protected]>:
Hi Guys,
How do you set the class in legend? ie :
$this->addDisplayGroup(array('day', 'month', 'year'), 'birthday',
array(
'legend' => 'Birthday'
) );
$this->setDisplayGroupDecorators(array(
'FormElements',
'Fieldset',
array(Legend, array('class' => 'someclassname'))
)
);
This code above is not working .. I want the result to be
<legend class="someclassname">Birthday</legend>
All helps is appreciated .. Thank you so much.
- Ari -
--
View this message in context: http://www.nabble.com/zend_form-
setting-class-in-%3Clegend%3E-tp22721211p22721211.html
Sent from the Zend Framework mailing list archive at Nabble.com.
--
----------------------------------------------------------------------
[MuTe]
----------------------------------------------------------------------