1

I'm searching for a solution with the magento buildin way to create html select blocks, with aria-required. I can display basic attributes like the id or the class for example, but not this attribute.

Here is my first essay:

$select = Mage::app()->getLayout()->createBlock('core/html_select');
$select->setName($name)
       ->setClass($class)
       ->setId($id);
       ->setArialRequired($ariaRequired); //doesn't work

Here is my second essay:

$select = Mage::app()->getLayout()->createBlock('core/html_select'); 
$select->setData(array(
    'name' => $name,
        'class' => $class,
        'id' => $id,
        'aria-required' => $ariaRequired //doesn't work
    ));

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.