Answer the question
In order to leave comments, you need to log in
[[+content_image]]
How to get input data in FormIt ModX?
Hello!
There is a site on ModX Revolution, with forms on FormIt.
After checking the entered data, it is necessary to transfer them to a custom snippet.
Added my hook to the form:
[[!FormIt?
&hooks=`spam,email,myhook`
&emailTpl=`tplForm`
&emailTo=`[email protected]`
&emailSubject=`Письмо с сайта http://askmeplz.com/`
&successMessage=`Ваша заявка успешно отправлена!`
&validate=`yournameer:required,yourphoneer:required`
]]
<?php
$data = print_r($_POST, TRUE).PHP_EOL;
// сливаем массив $_POST в файл
$fp = fopen($_SERVER['DOCUMENT_ROOT']."/file.txt", "w");
fwrite($fp, $data);
fclose($fp);
return true;
Answer the question
In order to leave comments, you need to log in
Hook is working. Maybe spam hook or email fails? Or validation fails? Try putting myhook first in the queue.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question