It turns out the feedback form Ticket (modx) there the devil's leg will break I can not understand it (and here is it possible to connect the usual file pxp to send more? And so another one to receive in the admin panel to display?

<h4 id="comment-new-link"> {if $_modx->config.cultureKey == 'ru'} <a href="#" class="btn btn-default">Оставить вопрос</a> {elseif $_modx->config.cultureKey == 'kz'} <a href="#" class="btn btn-default">Сұрақ қойыңыз</a> {elseif $_modx->config.cultureKey == 'en'} <a href="#" class="btn btn-default">Leave a question</a> {/if} </h4> <div id="comment-form-placeholder"> <form id="comment-form" action="" method="post" class="well"> <div id="comment-preview-placeholder"></div> <input type="hidden" name="thread" value="[[+thread]]" /> <input type="hidden" name="parent" value="0" /> <input type="hidden" name="id" value="0" /> <div class="form-group"> {if $_modx->config.cultureKey == 'ru'} <label for="comment-name">ФИО</label> {elseif $_modx->config.cultureKey == 'kz'} <label for="comment-name">Аты-жөні</label> {elseif $_modx->config.cultureKey == 'en'} <label for="comment-name">Full Name</label> {/if} <input type="text" name="name" value="[[+name]]" id="comment-name" class="form-control" /> <span class="error"></span> </div> <div class="form-group"> <label for="comment-email">[[%ticket_comment_email]]</label> <input type="text" name="email" value="[[+email]]" id="comment-email" class="form-control" /> <span class="error"></span> </div> <div class="form-group"> {if $_modx->config.cultureKey == 'ru'} <label for="comment-name">ИИН</label> {elseif $_modx->config.cultureKey == 'kz'} <label for="comment-name">ЖСН</label> {elseif $_modx->config.cultureKey == 'en'} <label for="comment-name">IIN</label> {/if} <input type="text" name="number" value="[[+number]]" id="comment-number" class="form-control" /> <span class="error"></span> </div> <div class="form-group"> {if $_modx->config.cultureKey == 'ru'} <label for="comment-name">Сфера</label> {elseif $_modx->config.cultureKey == 'kz'} <label for="comment-name">Сфера</label> {elseif $_modx->config.cultureKey == 'en'} <label for="comment-name">Sphere</label> {/if} <br> <script>$(document).ready(function(){ var $optgroups = $('#subcategory > optgroup'); $("#category").on("change",function(){ var selectedVal = this.value; $('#subcategory').html($optgroups.filter('[label="'+selectedVal+'"]')); }); });</script> <select id="category"> <option value="{if $_modx->config.cultureKey == 'ru'} Сфера тепло и электроэнергетики {elseif $_modx->config.cultureKey == 'kz'} Жылу және электр энергетикасы саласы {elseif $_modx->config.cultureKey == 'en'} Sphere of heat and electric power industry {/if}">{if $_modx->config.cultureKey == 'ru'} Сфера тепло и электроэнергетики {elseif $_modx->config.cultureKey == 'kz'} Жылу және электр энергетикасы саласы {elseif $_modx->config.cultureKey == 'en'} Sphere of heat and electric power industry {/if}</option> <option value="{if $_modx->config.cultureKey == 'ru'} Сфера использования атомной энергии {elseif $_modx->config.cultureKey == 'kz'} Атом энергиясын пайдалану саласы {elseif $_modx->config.cultureKey == 'en'} Sphere of use of atomic energy {/if}">{if $_modx->config.cultureKey == 'ru'} Сфера использования атомной энергии {elseif $_modx->config.cultureKey == 'kz'} Атом энергиясын пайдалану саласы {elseif $_modx->config.cultureKey == 'en'} Sphere of use of atomic energy {/if}</option> </select> <br> {if $_modx->config.cultureKey == 'ru'} <label for="comment-name">Категории</label> {elseif $_modx->config.cultureKey == 'kz'} <label for="comment-name">Санаттар</label> {elseif $_modx->config.cultureKey == 'en'} <label for="comment-name">Categories</label> {/if}<br> <select name="subcategory" id="subcategory"> <optgroup label="{if $_modx->config.cultureKey == 'ru'} Сфера тепло и электроэнергетики {elseif $_modx->config.cultureKey == 'kz'} Жылу және электр энергетикасы саласы {elseif $_modx->config.cultureKey == 'en'} Sphere of heat and electric power industry {/if}"> <option value="test1">{if $_modx->config.cultureKey == 'ru'} Общая {elseif $_modx->config.cultureKey == 'kz'} Жалпы ақпарат {elseif $_modx->config.cultureKey == 'en'} General information {/if}</option> <option value="test11">{if $_modx->config.cultureKey == 'ru'} Законодательство {elseif $_modx->config.cultureKey == 'kz'} Заңнама {elseif $_modx->config.cultureKey == 'en'} Legislation {/if}</option> <option value="test12">{if $_modx->config.cultureKey == 'ru'} Аккредитация {elseif $_modx->config.cultureKey == 'kz'} Аккредитация {elseif $_modx->config.cultureKey == 'en'} Accreditation {/if}</option> <option value="test13">{if $_modx->config.cultureKey == 'ru'} Теплоэнергетика {elseif $_modx->config.cultureKey == 'kz'} Жылу энергетикасы {elseif $_modx->config.cultureKey == 'en'} Heat power engineering {/if}</option> <option value="test14">{if $_modx->config.cultureKey == 'ru'} Электроэнергетика {elseif $_modx->config.cultureKey == 'kz'} Энергетика {elseif $_modx->config.cultureKey == 'en'} Power engineering {/if}</option> </optgroup> <optgroup id="B" label="{if $_modx->config.cultureKey == 'ru'} Сфера использования атомной энергии {elseif $_modx->config.cultureKey == 'kz'} Атом энергиясын пайдалану саласы {elseif $_modx->config.cultureKey == 'en'} Sphere of use of atomic energy {/if}"> <option value="test2">{if $_modx->config.cultureKey == 'ru'} Общая {elseif $_modx->config.cultureKey == 'kz'} Жалпы ақпарат {elseif $_modx->config.cultureKey == 'en'} General information {/if}</option> <option value="test21">{if $_modx->config.cultureKey == 'ru'} Законодательство {elseif $_modx->config.cultureKey == 'kz'} Заңнама {elseif $_modx->config.cultureKey == 'en'} Legislation {/if}</option> <option value="test22">{if $_modx->config.cultureKey == 'ru'} Лицензирование {elseif $_modx->config.cultureKey == 'kz'} Лицензиялау {elseif $_modx->config.cultureKey == 'en'} Licensing {/if}</option> <option value="test23">{if $_modx->config.cultureKey == 'ru'} Импорт - экспорт {elseif $_modx->config.cultureKey == 'kz'} Импорт - экспорт {elseif $_modx->config.cultureKey == 'en'} Import Export {/if}</option> <option value="test24">{if $_modx->config.cultureKey == 'ru'} Учет ИИИ {elseif $_modx->config.cultureKey == 'kz'} Accounting IRS {elseif $_modx->config.cultureKey == 'en'} Бухгалтерлік есеп IRS {/if}</option> </optgroup> </select> <span class="error"></span> </div> <div class="form-group"> <label for="comment-editor"></label> <textarea name="text" id="comment-editor" cols="30" rows="10" class="form-control"></textarea> </div> [[+captcha]] <label style="color:black;" for="comment-name">{if $_modx->config.cultureKey == 'ru'} Отображать на сайте {elseif $_modx->config.cultureKey == 'kz'} Сайтта көрсету {elseif $_modx->config.cultureKey == 'en'} Display on site? {/if}</label><br> <input type="radio" id="contactChoice1" name="res" value="disp"> <label style="color:black;" for="contactChoice1">Да</label> <input type="radio" id="contactChoice2" name="res" value="nodisp"> <label style="color:black;" for="contactChoice2">Нет</label> <div class="form-actions"> {if $_modx->config.cultureKey == 'ru'} <input type="button" class="btn btn-default preview" value="Предпросмотр" title="Ctrl + Enter" /> <input type="submit" class="btn btn-primary submit" value="Отправить" title="Ctrl + Shift + Enter" /> {elseif $_modx->config.cultureKey == 'kz'} <input type="button" class="btn btn-default preview" value="Алдын ала қарау" title="Ctrl + Enter" /> <input type="submit" class="btn btn-primary submit" value="Жіберу" title="Ctrl + Shift + Enter" /> {elseif $_modx->config.cultureKey == 'en'} <input type="button" class="btn btn-default preview" value="Preview" title="Ctrl + Enter" /> <input type="submit" class="btn btn-primary submit" value="Send" title="Ctrl + Shift + Enter" /> {/if} <span class="time"></span> </div> </form> </div> <!--tickets_captcha <div class="form-group"> <label for="comment-captcha" id="comment-captcha">[[+captcha]]</label> <input type="text" name="captcha" value="" id="comment-captcha" class="form-control" /> <span class="error"></span> </div> --> 

  • Your localization is strange. Usually it is implemented through the filter? something like: {{'Send'|trans}} . - vp_arth

1 answer 1

Two options:

  1. You use the form submission via the action = "" attribute, it is sent to the address you need, at that address you can send data to the next address, but all manipulations with the received data can be done in one script.
  2. You use js sending the form, for example via ajax, you can send it to any number of addresses and further redirect the user if necessary
  • I need to send which method to specific fields in the database? - Basszilla
  • In your case through ajax it will be better - Nikita Shahov