You could create a hierarchical custom post type and create a post for each form. Child forms are then set under a parent, their slug or a post meta field connected to the answers of their parent form.
When the form is submitted, you use the answer to select the best matching child and the you show that child form.
Another approach.
- Create a special endpoint, let’s say
submit
with the sub-typestep
.
On the main page, show the form. When the submission is a POST
request, validate the submitted data and either show the same for again to correct user errors or …
-
Create a new post for that company with
wp_insert_post()
. This function returns a post ID. Redirect the user to the next step (/submit/step/2
) and show the next form. Add the post ID as hidden field, and set a cookie for the user, so you can track the progress. -
Again, when that form is processed lead to step 3 or a success message.
Related Posts:
- Contact form 7 select box different value-text than content-text in option [closed]
- Simple form that saves to database
- shortcode doesn’t work
- Template plugin for blog posts? [closed]
- How to disable autocomplete for inputs in contact form 7? [closed]
- Is there any good tutorial to write custom login, registration and password recovery forms? [closed]
- WordPress plugin form not saving data
- Add form fields dynamically on button click
- How to trigger $_GET request within admin plugin page?
- Retrieving a Value from a wp-database
- Custom CSS for plugin form
- Form doesn’t submit on second submit call
- WP plugins for building a database?
- Hook into and send mail using WP Mail SMTP type plugin from HTML static front page?
- Custom form action to handle data inside a plugin
- wp_create_nonce function doesn’t work inside a plugin?
- New User Form – Custom Menu Page
- Image upload and other options in the same plugin settings form?
- When using Simple Fields plugin, how do I pull the information out of the database to display on a page?
- Anonymous Postings
- Creating an online questionnaire form – by Importing the questions from a spreadsheet?
- Using a custom plugin to capture input data via Ajax and PHP
- Contributive page where people logged in can write
- Contact Form 7 Get Image Function [closed]
- Submit page limited in time to upload image
- Ajax fail and get 504 error
- Checkbox conflict in my custom plugin admin page
- How to insert HTML/JavaScript form into WordPress page? [closed]
- Trying to fix form resubmition with PRG (Getting error: Cannot modify header information – headers already sent by)
- WP Plugins – Use includes to display page content
- How to fetch form data and show it to my page?
- Submit custom form from post content and execute in plugin
- Char limit on custom blog-post form? [closed]
- AJAX fileupload – TypeError: not a function ajaxSubmit()
- Is there a way to embed a Google Docs form in a page without using plugins?
- easy steps to make front end form without plugin
- Form that generates an ID for the customer
- Submit Form data to another page via Ajax (WordPress Way)
- Editing a text file from plugin menu
- Ajax Plugin Not Echoing Response
- Plugin that will output submitted form data for user? [closed]
- How to handle forms from sidebar widgets – Processing $_POST variables using get_field_name()
- coding a WordPress AJAX Form using PHP to check if User is Logged Out and Show error
- Creating a form and displaying entry data as a table
- Storing The Data Collected by Ninja Forms into Another (custom) Database [closed]
- Custom form not showing in correct place on page
- add_meta_box creating default form field types
- Form Plugin for Api Requests which is used via Shortcode
- Call another page in forms
- Echo out element to another page.
- How to Use the Filter “sidebar_login_widget_form_args”
- Select Form Element Not Saving from Plugin Options
- Is it save to replace with in WordPress search form
- Contact Form 7 Plugin emails not being received by some accounts
- Using AJAX to run SQL statement and populate dropdown
- Looking for a simple checkout plugin [closed]
- Redirect plugin after form submit or show errors
- get wpforms ID value from ACF text field
- User loggedin as Subscriber form not sending
- How to create a form where you can select multiple recipients, based on a list of website users?
- login form should redirect to register page for in 1st login next time it should redirected to home page
- WordPress search input in database, to edit information via form and update the database
- How to get data from a form on a wordpress site?
- WPForms Custom Redirect not working
- General Term for this form Field
- wp_set_password() does not work!
- Why is my form going to frontend on html form submission present on the php files inside my custom plugin?
- How to send custom mail when a user complete a specific form
- How to submit custom form data using ajax to HubSpot form?
- Ajax call to php function doesn’t work PHP code
- Page takes on two different formats
- After form submission want to show success message in the form page
- get/show Last ID
- Pause form submissions while upgrading plugins
- How to hide the form after successful php execution
- How can I automatically send an email with an excel file containing submissions for a form rather than an email per submission?
- Why doesn’t a form need an ‘action’ with a plugin that uses the post data?
- $POST variable is empty in receiving php add-on function but can be seen by jscript function
- I created a custom form in HTML/CSS and now I need it to submit … should I create custom PHP or is there a plugin I can use?
- Include plugin form in the home page
- How can i see/log all requests coming from a registration form (not from the UI)?
- Form submit from wordpress plugin
- Create user assessment and use results in sql query
- Saving custom form fields
- How do I convince this button to do something when it is clicked?
- wordpress option page data from select form is not saving to database
- Linking Plugin Files to WP
- Adding a Filter to Sidbar Login Plugin to Change Login Button Lable
- Carrying information from button click into form [closed]
- Capturing POST data
- County Finder form/plugin?
- Undefined variable _POST
- How to prevent page load on form submission
- How to develop an extension for a simple form post and post back? [closed]
- Plugin Beauty Contact Popup Form with while loop
- Is it possible to set different payment gateway on each Gravity Forms form? [closed]
- how to show selected options drop down menu values in attributes field in after saving post.php
- Redirecting to page on form submit – Revue plugin
- WP Donation Form with custom payment API
- How can I add a zip code service availability checker in WordPress without Woocommerce? [closed]