Book Image

Infusionsoft Cookbook

By : Paul Sokol
Book Image

Infusionsoft Cookbook

By: Paul Sokol

Overview of this book

Table of Contents (18 chapters)
Infusionsoft Cookbook
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Sending form submissions to different thank you pages based on custom fields


When campaign builder was introduced, it provided the ability to use merge fields on the form's thank you page.

This hack uses a simple piece of JavaScript to pull information from a customer merge field and redirect based on the fixed possible values.

Getting ready

We need to be logged in to Infusionsoft, inside a specific account and a campaign with a web form or landing page. We also want to have:

  • A custom field created that has fixed values (dropdown, radio button, Yes/No, and so on) to control the redirect. In this example, we have a custom dropdown type called Subscription2 with two possible values: No and Yes.

  • A URL for each different thank you page.

How to do it...

  1. Open the web form or landing page and go to the Thank-you Page tab.

  2. Add an HTML snippet.

  3. In the HTML snippet, write the following and make sure to use the proper merge field value and page URLs. Click on Save:

How it works...

This code is a simple switching...