在symfony中不是循环形式输入类型

时间:2017-04-30 09:31:19

标签: symfony twig

我的表单输入不在Twig上循环。但有一次渲染输入({{ form_row(share.mail) }})。然后不渲染表单输入。

{% for file in files %}

    <!-- Modal Paylaşma işlemi için-->
    <div class="modal fade" id="p{{ file.id }}" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title" id="myModalLabel">Kayıtlı olan bir kullanıcı emaili giriniz</h4>
                </div>
                <div class="modal-body">

                    {{  form_start(share, {'attr': {'action': path('form'),'novalidate': 'true'}})}}
                    {{ form_row(share.mail) }}

                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">Vazgeç</button>
                    <button type="submit" class="btn btn-primary" >Paylaş</button>
                    {{ form_end(share) }}
                </div>
            </div>
        </div>
    </div>

{% endfor %}

0 个答案:

没有答案