Skip Navigation

[Resolved] multi step/list group post using two custom types

This support ticket is created 5 years, 8 months 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
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 1 reply, has 2 voices.

Last updated by Waqar 5 years, 8 months ago.

Assisted by: Waqar.

Author
Posts
#1237442

Tell us what you are trying to do?
after submit of Post form 1 go to post form 2 to edit and hide post form 1
Is there any documentation that you are following?
https://toolset.com/documentation/post-relationships/how-to-set-up-post-relationships-using-toolset/
https://toolset.com/documentation/getting-started-with-toolset/publish-content-from-the-front-end/forms-for-editing/
Is there a similar example that we can see?
hidden link
What is the link to your site?
hidden link

#1237492

Hi Francisco,

Thank you for contacting us and I'll be happy to assist.

To hide the first post form when it is submitted successfully and show the second form, I'll suggest the following steps:

1. In your first form's settings, please select "Display a message instead of the form..." option for the field "After visitors submit this form:"

If you would like to show some message to the visitor that the first form has been submitted, it can be added in the text area below, otherwise, you can leave it blank.

As a result, the first form will automatically be hidden, once it has been submitted successfully.

2. To conditionally show the second form, you'll need a custom shortcode, which can get the information of URL parameters and return true or false if the first form's success parameter exists in there.

In your active theme's "functions.php" file, you can add the following code:


add_shortcode('show_second_form', 'show_second_form_func');
function show_second_form_func() {

	if( (isset($_GET['_tt'])) && ($_GET['_success_message'] == '1234_1')) {
		return 'true';
	}
	else
	{
		return 'false';
	}

}

Note: Please replace "123" with the actual ID of your first form.

Next, please add "show_second_form" in the "Third-party shortcode arguments" section, at WP Admin -> Toolset -> Settings -> Front-end Content.

As the last step, on the page where you'd like to show both these forms, you can use the conditional display block that uses this newly registered shortcode like this:
( ref: https://toolset.com/documentation/user-guides/conditional-html-output-in-views/using-shortcodes-in-conditions/ )


[cred_form form="first-form-slug"]

[wpv-conditional if="( '[show_second_form]' eq 'true' )"]
[cred_form form="second-form-slug"]
[/wpv-conditional]

Note: You'll replace "first-form-slug" and "second-form-slug" text with the actual form slugs on your website.

I hope this helps and please let me know if you need any further assistance around this.

regards,
Waqar