dynamically forms with custom markup

For programming and general questions on Zend Framework

dynamically forms with custom markup

Postby bondvt04 on Sat Dec 01, 2012 6:43 pm

Hi all! In my fieldset i have piece of code like this:
Code: Select all
$this->add(array(
            'type' => 'Zend\Form\Element\Collection',
            'name' => 'tags',
            'options' => array(
                'count' => 1,
                'should_create_template' => true,
                'allow_add' => true,
                'target_element' => array(
                    'type' => 'Tasks\Fieldset\TagFieldset'
                )
            )
        ));

How i can change auto-created markup for <span data-template="..."></span>? It is because i not use
Code: Select all
$this->formCollection($tags);

but i use
Code: Select all
<?php if(count($tags) > 0) {?>
                <?php foreach($tags as $tag) {?>
                    <div class="tag">
                        <label class="control-label">Тег</label>
                        <div class="controls">
                            <?php echo $this->formCheckbox($tag->get('use'))?>
                            <?php echo $this->formSelect($tag->get('tag_id'))?>
                        </div>
                    </div>
                <?php }?>
            <?php }?>

Of course, please not offer create markup in my fieldsets, like in ZF1. All markup i want keep in my view/application/forms/edit-form.phtml.
bondvt04
 
Posts: 3
Joined: Sat Dec 01, 2012 5:55 pm

Re: dynamically forms with custom markup

Postby bondvt04 on Sun Dec 09, 2012 8:20 pm

Any one?)
bondvt04
 
Posts: 3
Joined: Sat Dec 01, 2012 5:55 pm


Return to Zend Framework

Who is online

Users browsing this forum: No registered users and 6 guests