fb-pixel

Cab Grid Pro comes with a built-in booking form. Further custom fields can be added, but there is a set of pre-defined form fields that must be completed by the customer. Most of the built-in form fields are mandatory and must be completed by the customer for the booking request to be submitted.

There are occasional circumstances where the built-in form fields are superfluous or not required. In these cases, they can be made optional (not mandatory) and hidden from customer view. This is done by editing Cab Grid Pro plugin files directly (or through an add-on plugin) as follows.

Step 1: Make unnecessary fields optional

NOTE: Disabling validation of built-in fields is NOT recommended. Missing input can break Cab Grid features – especially if add-ons such as Booking Management and Stripe are installed and activated.

Additional settings can be defined in a special Cab Grid Pro file named _settings.php. This file is found within the Cab Grid Pro plugin folder. It offers a number of advanced custom configuration options. Because the built-in _settings.php file is updated each time Cab Grid Pro is updated, it is preferential to use a separate add-on plugin to define custom settings. The free Defaults Add-on is available for this purpose. For detailed information, please see our support article, “Advanced Settings for Cab Grid Pro – Defaults add-on plugin“.

There are two ways to edit these settings. Either via the WordPress Admin (assuming sufficient privileges are assigned e.g. admin rights) or by downloading the file from the web server, editing it with a text editor, and then re-uploading it via FTP. For step by step instructions, please see, “How to edit buttons & field labels using WordPress

The table below describes the settings that control built-in form field validation.

Step 2: Hide optional built-in form fields

Once unnecessary built-in form fields have been made optional they can be hidden from view. To do this, dedicated CSS styles must be added to the ‘Styling CSS’ box in the Cab Grid Pro WordPress Admin panel (WordPress Admin > Cab Grid Pro > OPTIONS > Styling CSS). For more details please see our article about making basic style changes with CSS.

The table below shows the CSS required to hide each field. Note, hidden fields are still included in messages sent by Cab Grid but their values will be empty. This can be avoided by creating dedicated custom email messages where possible.

Settings Table

Built-in Mandatory Fields Settings Variable Hide CSS
1. Pick up date and time $cabGridProPickupDateOptional="y"; .cabGridPro .cgpPickupDate {display:none !important;}
2. Return date and time (if return journey selected) $cabGridProReturnDateOptional="y"; .cabGridPro .cgpReturnDate {display:none !important;}
3. Customer name $cabGridProNameOptional="y"; .cabGridPro .cgpBookFormName {display:none !important;}
4. Customer telephone number $cabGridProTelOptional="y"; .cabGridPro .cgpBookFormTel {display:none !important;}
5. Customer email address $cabGridProEmailOptional="y"; .cabGridPro .cgpBookFormEmail {display:none !important;}
6. Exact pickup address $cabGridProPickupAddressOptional="y"; .cabGridPro .cgpPickLI {display:none !important;}
7. Exact destination address $cabGridProDestAddressOptional="y"; .cabGridPro .cgpDestLI {display:none !important;}

Cab Grid Pro Built-in Form Fields

Tags: , ,