A
A
Analka2021-11-24 13:52:08
MODX
Analka, 2021-11-24 13:52:08

How to display field array values ​​in Modx?

. 

<form name="contactForm" id="contact-form" class="contact-form form form-equival" method="post" action="">
                <div class="row-fluid">
                    <label>Ваше ФИО (полностью)</label>
                    <input class="input" required type="text" name='field[][name][]''>
                </div>
               
                <div class="row-fluid">
                    <label>Ваш E-mail</label>
                    <input class="input" required type="email" name='field[][email][]'>
                </div>
                <div class="row-fluid" >
                    <label>Ваш телефон (в международном формате)</label>
                    <input class="input" required type="text" name="field[][phone][]">
                </div>
                <div class="row-fluid" >
                    <label>Ваш телефон (в международном формате)</label>
                    <input class="input" required type="text" name="field[][phone][]">
                </div>
                <div class="row-fluid"  style="display: none">
                    <label>Дата начала</label>
                    <input class="input" type="text" name="date_start" value="{$.get.date_start}">
                </div>
                <div class="row-fluid"  style="display: none">
                    <label>Дата окончания</label>
                    <input class="input" type="text" name="date_end" value="{$.get.date_end}">
                </div>
                </div>
            </form>

how can I display values ​​in the zayavkaEmailTpl1 chunk like this:

name
emai
phone


name
email
phone

etc.

I thought it would work through FENOM

{foreach $field as $value}
 <div>{$value.phone}</div>
{/foreach}

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question