Documentation

Dynamic Form Field Population

Using the dynamic population in WP Booking System, you can dynamically populate a field with a value, through a query string in the URL or by using a php filter.

First, you have to enable dynamic population for the form field you want to dynamically populate.

Also notice the Field ID in the form field header. You will need this later.

After you enabled dynamic population, you have 2 methods of adding your value to the field:

Query String

You can populate a field via the query string by appending the wpbs-field-{$id} parameter to the end of your form URL along with your custom value.

For example:

https://www.yoursite.com/booking-page/?wpbs-field-7=Mike

This will automatically populate the field with “Mike”

Filter

To dynamically populate a field using a php filter, add this code to your theme’s functions.php file

The filter is wpbs_form_field_value_{$form_id}_{$field_id}

Was this article helpful?

Yes (2) No

We're sorry to see this article wasn't as helpful as we hoped it would be. Please let us know what you were looking for so that we can improve this documentation page.

Ready to take full advantage of the premium version?

WP Booking System helps you manage your calendars and bookings with just a few clicks, so you can spend more time on promoting your business and less time on managing it.

Get Started

Other Articles

Need help?

Send us a message

Ready to take full advantage of the premium version?

WP Booking System helps you manage your calendars and bookings with just a few clicks, so you can spend more time on promoting your business and less time on managing it.

Get Started