All Collections
Tutorials
Pass Dynamic Data From a Button on One Page to a Form Field on Another Page
Pass Dynamic Data From a Button on One Page to a Form Field on Another Page

How to use Dynamic Content for Elementor to pass dynamic data (post title) from a button event on one page to a form field on another page

Updated over a week ago

You may want to pass dynamic data from an archive Elementor page/template to a specific form field value on another page.

In this step-by-step guide, I'll be passing the post/page title to a form field on another page.

This is a quick guide on how to do that.
You can choose to start from your Elementor form page or from the button on the other page.
I will start from the Elementor form page.

  1. copy the form ID from the Advanced Form Field tab.

  2. Click the Dynamic Tag icon on Default Value and select Token.

  3. Select Wizard mode > Field = _GET > Subfield = your form subfield = petname.

  4. You can optionally add filters. In this example, we use sanitize_text_field, which is a WP function that sanitizes a string from user input or database.

Dynamic Element for Elementor filter

On the post title page sending the page data to the form page.

  1. On the link, click Dynamic Tag and select Token.

  2. Click on the token. Token = [post:title]

  3. Click on Advanced.
    Enter your target URL/?formfieldid= e.g. https://mypets.com/pets/?petname=
    This will dynamically append the post title to the end of the URL and populate the form field on the next page that contains the form ID.

Did this answer your question?