Passing data in the URL string to pre-populate information

Updated on 20-October-2016 at 10:16 AM

Business Catalyst End of life announcement - find out more details.

The system has a module you can use in your web pages that that allows you to capture information that you have appended to a URL. That module is { module_url }. For example, it allows you to pre-populate a bookings web form with a specific package name.

Let's make the URL of the page

Imagine you have a range of packages with details on other, different pages. When someone clicks on the links, you need to know which package they were looking at, and pre-populate the web form with the package that they actually want to book.

You can put the package name in the URL, like this:

And for other packages it might look like this:


Now this is where {module_url } comes in - it allows you to retrieve what comes after "package=". You use it by putting the module in the HTML of your page, including what you have put before the "=" sign.

So in this case, put {module_url,package} to retrieve either Platinum, Gold or Silver.

Below are some steps to use this module.

1. Insert a link to your page with the form on it manually using the link manager, and then modify the link to add "arguments" to the URL. The link will look something like this:

2. Then go to the page with the actual form on it. In a text box on the form (or in the JavaScript)  put {module_url, <parameter>}. In this example you would put {module_url,package}. This will then be replaced by the text that comes after the "=" sign - in this case it would be replaced by "Platinum".

This module isn't limited to web forms though. You can use this module in many many ways, for example in content holder names as described in this article