Lost Svan
Lost Svan

Reputation: 31

When a client leaves a request,he receives an automatic response,and regardless of what language the form is in,he sends the EN version of the letter

When a client leaves a request, he receives an automatic response, and regardless of what language the form is in (there are several languages ​​on the site), he sends the EN version of the letter

Here is the form itself

{'!AjaxForm' | snippet: [
'snippet'=>'FormIt',
'hooks'=>'email,FormItAutoResponder',
'FormFields'=>'where,name,email,telVal,msg,ASSIGNED_BY_ID,OPPORTINUTY,types,site,sourcebuster',
'form'=>'orderFormTpl',
'submitVar'=>'orderFormSbm',
'emailTpl'=>'orderFormEmail',
'emailTo'=>$_modx->config.robotemail,
'emailFrom'=>$_modx->config.no_email,
'emailReplyTo'=>$_modx->getPlaceholder('email'),
'emailSubject'=>$_modx->config.site_name~': '~ $_modx->resource.pagetitle~'; Заказ услуги (id:'~$_modx->resource.id~')',
'validate'=>'name:required, email:required:email, tel:required, msg:required, firstname:blank',
'validationErrorMessage'=>$_modx->lexicon('mmix.formError'),
'successMessage'=>$_modx->lexicon('mmix.formSuccess'),
'fiarToField'=>$_modx->getPlaceholder('email'),
'fiarTpl'=>'FormItAutoResponderTpl',
'fiarSubject'=>'',
'fiarFromName'=>'Diamant',
'fiarFrom'=>$_modx->config.emailsender,
'frontend_css'=>'',
]}

And here is the fiarTpl' field, which is responsible for auto-response

<h3>[[%mmix.respH? &namespace=`!diamant` &language=`[[++cultureKey]]`]], [[+name]]!</h3>
<p>[[%mmix.respText? &namespace=`!diamant` &language=`[[++cultureKey]]`]] <a target="_blank" href="[[+pageUrl]]">[[+pageUrl]]</a></p>

<table>
<tr valign="top"><td><b>[[%mmix.formName? &namespace=`!diamant` &language=`[[++cultureKey]]`]]:</b></td><td>[[+name]]</td></tr>
<tr valign="top"><td><b>Email:</b></td><td><a href="mailto:[[+email]]">[[+email]]</a></td></tr>
<tr valign="top"><td><b>[[%mmix.formTel? &namespace=`!diamant` &language=`[[++cultureKey]]`]]:</b></td><td><a href="tel:[[+tel]]">[[+tel]]</a></td></tr>
[[+msg:!empty=`<tr valign="top"><td><b>[[%mmix.formMsg? &namespace=`!diamant` &language=`[[++cultureKey]]`]]:</b></td><td>[[+msg]]</td></tr>`]]
</table>
<p>[[%mmix.respTextBottom? &namespace=`!diamant` &language=`[[++cultureKey]]`]]</p>

Upvotes: 0

Views: 22

Answers (0)

Related Questions