N
N
Nik_Set_72017-08-11 11:02:25
MODX
Nik_Set_7, 2017-08-11 11:02:25

How to send several products to the mail via eForm in Modx?

I work with Modx Evo.
There is a form in which all ordered goods are indicated and you need to specify your data. After that, the entered data and ordered goods are sent to the mail.
However, if I select multiple products, the last one is sent anyway.
How can I send the data I need via eForm?
Although more precisely: how to properly format a chunk and prescribe the names of the goods so that not the last product is sent, but all the selected ones?
formOrder:

<select name="subject" style="display: none;">
  <option value="Feature Request">Запрос подробностей.</option>
</select>
<p><span style="color:#900;">[+validationmessage+]</span></p>
<form id="form_order" method="post">
  <input type="hidden" name="formid" value="feedbackForm" />
  
  <p><label accesskey="n">Ваше Имя</label>
  <input type="text" name="Name" id="name_3" maxlength="60" eform="Your Name::1" /></p>

  <p><label accesskey="e">Ваш е-мэйл адрес</label>
  <input type="text" name="email" id="email_3" size="40" maxlength="40" eform="Your Email Address:email:1" /></p>

  <p><label accesskey="e">Ваш Телефон</label>
  <input type="text" name="phone" id="phone_3" size="40" maxlength="40" eform="Your Phone:phone:1" /></p>
  <!--Сюда через самописный js-скрипт добавляются конструкции <div>...</div> с именем, ценой и кол-м товаров -->
  <div class="inputs"></div>
  <p><input type="submit" name="submit" id="button_order" value="Send Feedback"></p>
</form>

Product design example:
<div class="field_2" id="_product_2" style="display: block;">
  <input type="text" class="field" id="=product_2" name="dynamic[]" value="Пояс для похудения HOT SHAPERS" disabled="">
  <input class="number" type="text" id="+product_2" value="1">
  <div class="block_for_price">
    <div>Цена: </div>
    <input type="text" id="@product_2" value="799" disabled="">
  </div>
  <div onclick="example_5(2)" class="minus">Удалить</div>
</div>

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