Skip to content Skip to main navigation Skip to footer

Understanding Plugin’s Shortcodes: Booking Form vs. Widget

The plugin provides two distinct shortcodes for embedding forms on your website: Booking Form and Widget shortcode. You can find the shortcodes for both the booking form and widget in the menu: ‘Chauffeur Booking System’ -> ‘Booking Forms’. Edit your form (or create a new one if you haven’t already), then go to the ‘General’ -> ‘Shortcodes’ tab. There, you’ll find ready-made shortcodes with the correct ID already filled in.

Booking Form Shortcode

This shortcode is used to embed the main booking form on any page of your website.

Example shortcode:

[chbs_booking_form booking_form_id="10007"]

Good to Know

The ‘booking_form_id’ is a unique identifier for your form. In this example, ‘10007’ is a placeholder ID. Make sure to replace it with the actual ID of the form you want to display, which you can find in ‘Chauffeur Booking System’ -> ‘Booking Forms’ menu.

How to use:

  • Add this shortcode to any page where you want the main booking form to appear.
  • If you’re using a page builder like Elementor, use the Shortcode widget to insert the code.

Example:

Suppose you embed the shortcode on a page called ‘booking’. The full URL of this page would be:

https://yourwebsite.com/booking/

This page will serve as the primary booking page where users complete the entire booking process.

Widget Shortcode

The widget shortcode is for embedding a simplified booking form on other pages. This widget captures initial details and redirects users to the main booking form to complete the process. Using the widget is completely optional and depends on your preferred setup.

Example shortcode:

[chbs_booking_form booking_form_id="10007" widget_mode="1" widget_style="1" widget_booking_form_url=""]

How to use:

  1. Copy the widget shortcode (as shown above).
  2. Fill in the ‘widget_booking_form_url’ parameter with the full URL of your main booking form page.
  3. Add this shortcode to a different page than your main booking form.

Example shortcode:

[chbs_booking_form booking_form_id="10007" widget_mode="1" widget_style="1" widget_booking_form_url="https://yourwebsite.com/booking/"]

How it works:

  • The widget appears as a simple form on the page where you embed it.
  • Users fill out the basic details in the widget.
  • Upon submission, users are redirected to the main booking form, where the information they entered in the widget is pre-filled.

Quick Summary

  • Booking Form Shortcode: Use this on the main booking page for the full booking process.
  • Widget Shortcode: Use this on other pages to capture initial details and redirect users to the main booking form.

Good to Know

By properly using the ‘widget_booking_form_url’ parameter in the widget shortcode, you ensure users are seamlessly redirected to the main booking form.

Summary
Document version: 1.0
Last updated: December 12, 2024
Plugin version: 5.7+

Was This Article Helpful?

Related Articles