Title: Can&#039;t performe the code after submitting
Last modified: August 22, 2016

---

# Can't performe the code after submitting

 *  [helekopter](https://wordpress.org/support/users/helekopter/)
 * (@helekopter)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/cant-performe-the-code-after-submitting/)
 * Hi.
 * First of all, sorry my pure English. I have a code which must be perfomed after
   submitting the form (or after succesed mail sent)
 *     ```
       <br />
       $email = $_POST['your-email-phone'];<br />
       $name = $_POST['your-name'];<br />
       $budget = $_POST['number-45'];<br />
       $comm = $_POST['textarea-168'];</p>
       <p>    	$arFields = array(<br />
       		'TITLE' => $name,<br />
       		'NAME' => $name,<br />
       		'COMMENTS' => $comm,<br />
       		'PHONE_MOBILE' => $email,<br />
       		'EMAIL_HOME' => "gererro@mail.ru",<br />
       		'OPPORTUNITY' => $budget,<br />
       		'CURRENCY_ID' => 'UAH',<br />
       	);<br />
       print_r ($arFields);
       ```
   
 * (its example). But no matter how I tried to get it to work, it isn’t. I’am trying
   do it with hooks (wpcf7_mail_sent or wpcf7_before_send_mail), trying like this:`
   if ( $_POST['_wpcf7_mail_sent']['ok'] ) { condition }`
    but it still not working.
 * Please help me solve it issue. Thank you
 * [https://wordpress.org/plugins/contact-form-7/](https://wordpress.org/plugins/contact-form-7/)

The topic ‘Can't performe the code after submitting’ is closed to new replies.

 * ![](https://ps.w.org/contact-form-7/assets/icon.svg?rev=2339255)
 * [Contact Form 7](https://wordpress.org/plugins/contact-form-7/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/contact-form-7/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/contact-form-7/)
 * [Active Topics](https://wordpress.org/support/plugin/contact-form-7/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/contact-form-7/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/contact-form-7/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [helekopter](https://wordpress.org/support/users/helekopter/)
 * Last activity: [11 years, 8 months ago](https://wordpress.org/support/topic/cant-performe-the-code-after-submitting/)
 * Status: not resolved