Lead Capture Tools

juusui
参加者

Single form for multiple pages, multiple thank you pages

解決

We're using our WordPress website for landing pages and thank you pages. We embed the form on the WP landing page and redirect to another WP thank you page after form submission.

 

We have multiple pages that collect the same info so we would like to use the same form. However, we would need to redirect to a thank you page specific to the landing page. 

 

Here's an example:

  • Both LP1 and LP2 use FormA
  • When I user completes FormA on LP1, it should redirect to Thank You Page 1
  • When I user completes FormA on LP2, it should redirect to Thank You Page 2

 

Does anyone know how to set this up? Would this be more appropriately asked in the developer discussions?

0 いいね!
1件の承認済みベストアンサー
Ben_M
解決策
キーアドバイザー

Single form for multiple pages, multiple thank you pages

解決

For this you will need to customize the form embed code so that the same form can go to different thank you pages, display different messages, do different tasks, etc.

 

https://legacydocs.hubspot.com/docs/methods/forms/advanced_form_options 

元の投稿で解決策を見る

3件の返信
Ben_M
解決策
キーアドバイザー

Single form for multiple pages, multiple thank you pages

解決

For this you will need to customize the form embed code so that the same form can go to different thank you pages, display different messages, do different tasks, etc.

 

https://legacydocs.hubspot.com/docs/methods/forms/advanced_form_options 

juusui
参加者

Single form for multiple pages, multiple thank you pages

解決

This is exactly what I need. Thank you. 

0 いいね!
nickbudjml
参加者

Single form for multiple pages, multiple thank you pages

解決

Hey guys! @juusui and @Ben_M 

 

I'm trying to do the same, but don't have much dev experience. (Logic skills strong, syntax/language skills weak).

 

I'd like to do:

onFormSubmit

use IF logic to assign the proper redirectUrl string. 

I don't know the right format. Would love a little advise!

 

My thought:

 

onFormReady: function($form) {

if ( 
	(
		document.querySelector("input[name='FIELD-NAME']").value = "INPUT-VALUE"
		&&
		document.querySelector("input[name='FIELD-NAME']").value = "INPUT-VALUE"
		&&
		document.querySelector("input[name='FIELD-NAME']").value = "INPUT-VALUE"
	)
	||
	(
		document.querySelector("input[name='FIELD-NAME']").value = "INPUT-VALUE"
		&&
		document.querySelector("input[name='FIELD-NAME']").value = "INPUT-VALUE"
		&&
		document.querySelector("input[name='FIELD-NAME']").value = "INPUT-VALUE"
	) 
){

// if field value is a specific results, then set value of redirectUrl to a hardcoded URL I desire 
	redirectUrl.value = "https://THE-PAGE-I-WANT.com/" ;
}
if ( 
	(
		document.querySelector("input[name='FIELD-NAME']").value = "INPUT-VALUE"
		&&
		document.querySelector("input[name='FIELD-NAME']").value = "INPUT-VALUE"
	) 
){

// if field value is a specific results, then set value of redirectUrl to a hardcoded URL I desire 
	redirectUrl.value = "https://THE-PAGE-I-WANT.com/" ;

} else {
// Otherwise, set value of redirectUrl to a default hardcoded URL I desire 
	redirectUrl.value = "https://THE-PAGE-I-WANT.com/" ;
}

 

0 いいね!