I am trying to add text which is a link upon signup.
The first piece of code below works, the second does not. Any idea why not?
This works:
//SES Custom Work
$categories = Engine_Api::_()->getDbtable('categories', 'cecustom')->getCategoriesAssoc();
if( count($categories) > 0 ) {
$this->addElement('Select', 'category_id', array(
'label' => 'In which district are you eligible to vote?','description' => 'Find Your District here: http://bit.ly/2ZEe6KN',
'multiOptions' => $categories,
));
}
//SES Custom Work
This does not:
//SES Custom Work
$categories = Engine_Api::_()->getDbtable('categories', 'cecustom')->getCategoriesAssoc();
if( count($categories) > 0 ) {
$this->addElement('Select', 'category_id', array(
'label' => 'In which district are you eligible to vote?','description' => 'Find Your District <a href='http://bit.ly/2ZEe6KN'>by clicking here.</a>,
'multiOptions' => $categories,
));
}
//SES Custom Work
Moved to third party product discussions as the code you show is for a third party custom plugin.
Cleaned up your code. The following should work:
//SES Custom Work
$categories = Engine_Api::_()->getDbtable('categories', 'cecustom')->getCategoriesAssoc();
if( count($categories) > 0 ) {
$this->addElement('Select', 'category_id', array(
'label' => 'In which district are you eligible to vote?','description' => 'Find Your District <a href="http://bit.ly/2ZEe6KN">by clicking here.</a>',
'multiOptions' => $categories,
));
}
//SES Custom Work