CarrGo Astro documentation

Booking and forms

Send booking requests, contact messages and driver applications to Web3Forms, Formspree, WhatsApp or email.

CarrGo has no server, so a service delivers your forms for you. One setting chooses it for every form on the site: the booking form, the contact form, the driver application and the corporate enquiry form.

Choose a provider

In src/site.config.ts, set booking.provider:

Provider What happens when someone sends a form
demo A message says nothing was sent. For the demo only; change it before you publish.
web3forms The details are emailed to you, and the visitor lands on your /thank-you/ page. Free at web3forms.com.
formspree The details are emailed to you, and the visitor sees Formspree’s thank-you page. Free plan at formspree.io.
whatsapp WhatsApp opens with the details written out, ready to send to contact.whatsapp.
email The visitor’s email app opens with the details written out, addressed to contact.email.

Web3Forms

  1. Enter your email address on web3forms.com to get an access key.
  2. In site.config.ts, set provider: 'web3forms' and paste the key into web3formsKey.

The key is safe to have in your site’s code: it can only send messages to your inbox. CarrGo also adds Web3Forms’ hidden spam trap to every form.

Formspree

  1. Create a form on formspree.io. Its address ends in an ID such as xyzabcd.
  2. Set provider: 'formspree' and paste the ID into formspreeId.

CarrGo adds Formspree’s hidden _gotcha field, so spam bots that fill it in are discarded.

WhatsApp and email

These need no account. They work best for small firms that already take bookings by chat or email. The visitor still has to press send in WhatsApp or their email app, so you only receive the request if they do.

How the booking forms work

There are two kinds of booking form:

  • Quick forms sit in heroes and short booking blocks. They ask for pickup, drop-off, time and vehicle, then take the visitor to your Book page (booking.page, normally /book/) with those answers already filled in.
  • The full form is on the Book page. It asks for the trip, passengers, suitcases, vehicle, name, mobile number, email, flight number and notes, and sends everything to your provider.

The return time only appears when the visitor chooses Return. The flight number is optional.

The fare estimator’s Book this ride button also opens the Book page with the route and vehicle filled in.

The contact form

The contact block shows your phone, WhatsApp, email and address beside a message form. You can change its topic list, the subject line of the email you receive, and the button label:

- type: contact
  variant: split
  topics: [A booking, Lost property, Business account]
  subject: New message
  button: Send message

The Drive page reuses this block as the driver application, and the Corporate page as the enquiry form, each with its own topics and subject.

The thank-you page

/thank-you/ is in src/content/pages/thank-you.md. Edit the words there. It’s kept out of search results.