Title: Get form variable after submit
Last modified: August 22, 2016

---

# Get form variable after submit

 *  [marilena6](https://wordpress.org/support/users/marilena6/)
 * (@marilena6)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/get-form-variable-after-submit/)
 * Hello.
    I would appreciate some help. After the form is submitted, I would like
   to get the value of a variable (eg. text your-name) and put some php code (specifically
   substract the last character of the word) so it would appear in the success message.
   Can anyone help me with this?
 * [https://wordpress.org/plugins/contact-form-7/](https://wordpress.org/plugins/contact-form-7/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [Djules](https://wordpress.org/support/users/djules/)
 * (@djules)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/get-form-variable-after-submit/#post-5251994)
 * Duplicate topic.
 * [http://wordpress.org/support/topic/run-php-code-after-successful-submit](http://wordpress.org/support/topic/run-php-code-after-successful-submit)
 *  Thread Starter [marilena6](https://wordpress.org/support/users/marilena6/)
 * (@marilena6)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/get-form-variable-after-submit/#post-5252025)
 * Ι read related posts, but I’m novice in plugin configuration and I don’t know
   which files to edit and how.
    For example when I submit a form with a textfield
   value “John” in the success message I would like to see “Hello, Jo” (last two
   letters omitted). Any guidance about the functions I should use would be helpful.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Get form variable after submit’ 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/)

 * 2 replies
 * 2 participants
 * Last reply from: [marilena6](https://wordpress.org/support/users/marilena6/)
 * Last activity: [11 years, 9 months ago](https://wordpress.org/support/topic/get-form-variable-after-submit/#post-5252025)
 * Status: not resolved