Capture price value from Post, and append to redirect URL

I need to design an Event Page like below, using Loops & Logic

If people click on any of these Events, we want it to redirect to a Fluent Payment Form, which they can then use to Register for the Event, and make Payment.

THE WORKFLOW
You will notice that each of the Events has a Price: when each Event is clicked and redirected to FluentForm, we want FluentForm to be able to automatically capture the Price value, and enable Checkout immediately, based on that Price value.

For example, Admiralty concert cost 3000: when it is clicked and redirected to Fluent Event Registration Form, FluentForm should automatically capture this 3,000 as the Amount to be paid.

WHAT IS AVAILABLE

Unfortunately, FluentForm does not have any direct way to do this. What is available in FluentForm is something called “dynamic query string” .

How it works is that the price value has to find a way to be appended to the end of the URL of the FluentForm:

For example: the URL of where I have the FluentForm is: "mydomain[dot]com[slash]fluentform

If Loops & Logic has a way to append ( ?price=3000 ) to the end of the URL of the location of the FluentForm, then FluentForm will capture that value.

Take note that the value to be appended to the URL, has to match the correct value of the Post.

How can I achieve this, using Loops & Logic ?

Regards.

To achieve what you’re describing, you’ll need:

  • the exact name of the post type (event) and field name (price)
  • a way to create the URL with dynamic template tags

The second point requires that you have control over the entire link being displayed, for example in a block or theme template file. Depending on what is displaying the link currently (sounds like the form plugin), it may be difficult to use dynamic template tags necessary for passing the URL query parameter.


  1. The name of the Post Type is events and the field name is Price.
  2. I really don’t understand what you mean here.
    …The Form was just placed on a normal Page, through its shortcode: so it doesn’t really control anything. However, if you add a query string parameter value to the URL where the Form is located, it is able to capture that value into the Form.

How and where are you displaying the URL (the link to the form page)? Are you able to add a dynamic template tag there?

Here’s a rough sketch of the events list.

<Loop type=event count=4>
  <Field title /><br>
  Price: <Field name=Price /><br>
  <a href="/example-form?price={Field Price}">Link to form</a>
</Loop>

You might want to encode the URL query parameter using Format: