You cannot save raw PHP inside post content, it gets cleaned out on save. This is an obvious security precaution.
However, there are plugins that will enable you to do this, for example: http://wordpress.org/extend/plugins/allow-php-in-posts-and-pages/
This is not recommended though, better solution would be to create a generic shortcode for your from.
Related Posts:
- How to fix ‘Notice: Undefined index:’ in PHP form action
- Genesis – Customize search form
- Metabox repeating fields – radio buttons not saving correctly
- Inserting Gravity Form checkbox values into Advanced Custom Fields [closed]
- How to handle a custom form in wordpress to submit to another page?
- Has anyone tried putting PHP ActiveRecord on WordPress?
- Handling error states with admin_post
- Creating a WordPress form with a PHP script and default header
- On update to 3.04 site started recording accents as “á” and “á”, what to do?
- submit the form to same page
- Implement a multi-value input field where the number of entries is not limited
- Custom WordPress+PHP+MYSQL+AJAX form, submit event not captured by Javascript, but does POST data to the DB
- Getting the dropdown menu to redirect to different pages?
- Adding Custom Forms
- How do I let users upload files to a chosen location?
- woocommerce registration form with klaviyo(don’t work with current user)
- Custom Form Processing Issue
- Custom profile field with birthday. Troubles with
- WooCommerce/WordPress: how hide entire table form after submit (Admin Dashboard)?
- How to store data from multiple forms using ajax and php
- How to use $query->set with post__in?
- Ajax loaded form replaces form action with Ajax url
- prevent default not stopping page refresh. Passing form information to and from php with ajax in a wordpress site
- How to limit the number of forgot password reset attempts in WordPress?
- Custom search results page not working with empty search
- Modify HTML structure of fields in woocommerce checkout form
- Post + form + action + results on the same page
- Ajax call return 404
- Input data from email form not going to JSON file
- Styling my own password protected page, how to deal with wrong password?
- Search Query: how to construct a search string from two select elements?
- Login to wordpress by clicking a link and specifying usernaname and password in url
- Databases – Submitting data from inputs to database [closed]
- How to show a ‘correct’ message after submit a form?
- db converts decimal number wrong
- WordPress admin-ajax.php 400 bad request
- Ajax contact form return 0
- “operation successful” message
- User register hook is not working in woocomerce register form
- Search WordPress using static html page
- How to put a form with php code into a variable or shortcode?
- How to send form data from WordPress (Meta Box) to an OData service?
- WordPress shortcode returns the data before
- Shortcode to embed Edit Account form not working
- Form Submission Not Working In Custom Theme
- Capture form data in one function and use it in another function (same file)
- How to display success message correctly and delete it when the page is refreshed
- Using admin-post.php for admin form but it directs me to admin-post.php white screen
- Why does my user not get added to the database on custom registration?
- Submitting a form, using Ajax, to run a SQL Select query based on user input from the form
- Pass important values server-side when processing form
- WPDB secure custom form
- Adding attribute to the post.php form tag in wp-admin
- Make a page (url) not cacheable [closed]
- Front end file upload returning wrong attachment url
- WordPressUser Submission Form
- Page Options Saving But Not Updating In Backend
- Testing a Form’s Zipcode Field with Regular Expressions to Determine WordPress Page Behaviour
- Cascading dropdown select search based on Parent Page & Child Page
- HTML Form Question
- $_POST returning empty values
- How to send custom form submissions to WordPress Database?
- I want it to detect the duplicate comment and give a warning on the same page
- Updating user meta adds string count to value?
- PHP multiple forms, same page, isset($_POST[]) not working?
- “Class Not Found” in HTML Form Target PHP File that contains the class
- How to create a widget with a populated dropdown?
- Store user form submitted information in post type
- Implement jQuery Smart wizard
- How do I stop my form from adding code to current page URL instead of re-directing. Been stuck for days
- Updating the database after parsing CSV document
- custom search query database in child theme
- Using transients to store form notifications
- wordpress form action page not found
- If input field has value Require another field – PHP
- Form direction to .php on localhost
- Form not working as it should in WordPress, but in a normal HTML site it does
- Submitting my form to the database and then redirecting to payment site
- Ajax call URL 404’ing when pushed to staging server
- Update only some custom user fields
- Post from front end form to post_meta
- Accessing values entered via form – try again
- Nonce fail after second submit attempt
- Dynamic form variables for post meta
- Styling admin page rows in order of importance (checkboxes)
- Headers for Contact Form are wrong
- Using Nonce for my Form
- Data inserted in database, but ajax calls error function
- upload images on front by user using form
- How to pass username into form that sends data to database
- HOW TO Insert Existing PHP Code to WOrdPress
- Where to put include php file?
- Field validation strlen works in php7.4 fails 8.1 [closed]
- Embed PHP script into WP – what is the best way
- Preventing script injections in HTML form
- Putting form result in my database
- Bulk data save in custom table
- How to create a form that display license key (and email it to user) after the user enter their email and 10 digit code?
- Automatically populating a date parameter within a shortcode
- How can I process a form submission from an HTTP POST request?