Title: Add PHP Code after Submit
Last modified: August 22, 2016

---

# Add PHP Code after Submit

 *  Resolved [sl_shah](https://wordpress.org/support/users/sl_shah/)
 * (@sl_shah)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/add-php-code-after-submit/)
 * Hi,
 * Its a great tool, thanks for sharing.
 * I have written a customized PHP code that I want to run after data is submitted
   to database. Basically, based on user data submission I want to create some rtf
   file and send to user as attachment on welcome mail. How can I achieve this.
 * [https://wordpress.org/plugins/form-maker/](https://wordpress.org/plugins/form-maker/)

Viewing 1 replies (of 1 total)

 *  Plugin Contributor [webdorado](https://wordpress.org/support/users/webdorado/)
 * (@webdorado)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/add-php-code-after-submit/#post-5632654)
 * Dear sl_shah,
 * Please be informed, that in form-maker\frontend\models\FMModelForm_maker.php 
   file, around 1975 line there’s this code:
 * $send = wp_mail(str_replace(‘ ‘, ”, $recipient), $subject, stripslashes($body),
   $headers, $attachment_user);
 * where $attachment_user are the files, which are being sent to the user. It is
   an array, so you can push the necessary data to it.
 * Thank you.

Viewing 1 replies (of 1 total)

The topic ‘Add PHP Code after Submit’ is closed to new replies.

 * ![](https://ps.w.org/form-maker/assets/icon-256x256.png?rev=2068681)
 * [Form Maker by 10Web - Mobile-Friendly Drag & Drop Contact Form Builder](https://wordpress.org/plugins/form-maker/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/form-maker/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/form-maker/)
 * [Active Topics](https://wordpress.org/support/plugin/form-maker/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/form-maker/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/form-maker/reviews/)

## Tags

 * [submit](https://wordpress.org/support/topic-tag/submit/)

 * 1 reply
 * 2 participants
 * Last reply from: [webdorado](https://wordpress.org/support/users/webdorado/)
 * Last activity: [11 years, 4 months ago](https://wordpress.org/support/topic/add-php-code-after-submit/#post-5632654)
 * Status: resolved