Skip Navigation

[Resolved] Multistep Form with post Relationship

This support ticket is created 6 years, 1 month ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

Author
Posts
#1131142

I would like to create a multistep Cred form like following:

First Step:
the user choose a parent of the post then clicks on "Next"

Second Step:
some fields show up and will be filled out automatically from values of the Parent post.

I know it's possible to do this if i create double pages and double forms. a form for the parent that redirect to an edit form with all needed fields. but i wonder if there is away to do this within one Cred form only. (multisteps with one form)

#1131485

There's not an easy way to do this all in one Form, because there's no JavaScript API. You could do something similar with a View, a Create Child Post link, and one Form, but after the User selects a parent post they must navigate to another page.
- Create a Form that creates Child Posts.
- Insert the Form in a Content Template or Template Layout.
- Create a View of Parent posts. You can include custom search filters so your Users can find the desired Parent easily.
- In the Loop of the View, insert a Create Child Post link and configure it to point to your Child Post Form.
- Edit the Child Post Form and use the urlparam containing the parent post ID to set the default values for any form fields.

Another option is to place the create child post Form directly on the parent post page, so your Users don't have to navigate away from the parent post to create a child post. Let me know if you have questions about either of these options.