Zend framework Zend_Form div inside div

I looked through stackoverflow to find the answer to my question. Basically I want to use Zend_Form to place the div inside the div to the right below the input field. I found the code below to add a div, but now I want another inside. I need to get the html equivalent

<div id = "parentDiv">
    <div id = "innerDiv"></div>
</div>

Code taken from another question here in stackoverflow, I don’t remember which one, please forgive me.

$this->addElement(
                'hidden',
                'suggestions',
                array(
                    'required' => false,
                    'ignore' => true,
                    'autoInsertNotEmptyValidator' => false,
                    'decorators' => array(
                        array(
                            'HtmlTag', array(
                                'tag' => 'div',
                                'id' => 'suggestions',
                                'class' => 'suggestionsBox',
                                'style' => 'display: none;'
                            )
                        )
                    )
                )
        );
        $this->suggestions->clearValidators();
+3
source share
1 answer

just guess, but try the following:

$this->addElement(
                'hidden',
                'suggestions',
                array(
                    'required' => false,
                    'ignore' => true,
                    'autoInsertNotEmptyValidator' => false,
                    'decorators' => array(
                        array(
                            'HtmlTag', array(
                                'tag' => 'div',
                                'id' => 'suggestions',
                                'class' => 'suggestionsBox',
                                'style' => 'display: block;'
                            ),
                            'HtmlTag', array(
                                'tag' => 'div',
                                'id' => 'another',
                                'class' => 'suggestionsBox',
                                'style' => 'display: block;'
                            )
                        )
                    )
                )
        );
-1
source

Source: https://habr.com/ru/post/1761823/


All Articles