Polaris Astro documentation

Enquiries

How visitors send you a trip or stay request, and how to receive it by WhatsApp, email, Web3Forms or Formspree.

This is the theme edition of Polaris. Visitors send an enquiry and you reply. They pay nothing on the site, and there is no online booking. Online booking, payments and an admin area are a separate edition that is not included in this download.

Polaris is a static site, so the enquiry form either hands the request to WhatsApp or your visitor’s mail app, or posts it to a form service that emails it to you.

Choose how requests reach you

Set booking.send in src/site.config.ts:

booking: {
  mode: 'enquiry',
  href: '/enquire/',
  send: 'whatsapp',
  web3formsKey: '',
  formspreeId: '',
  subject: 'New trip request',
  thanks: '/enquire/?sent=1',
},
send What happens You also set
whatsapp Opens a WhatsApp chat with the request typed out. Nothing is stored anywhere. whatsapp (digits only, with country code)
email Opens the visitor’s mail app with the subject and message filled in. email
web3forms Posts the form to Web3Forms, which emails it to you. booking.web3formsKey
formspree Posts the form to Formspree, which emails it to you. booking.formspreeId

The other settings:

Setting What it does
mode Always 'enquiry' in this edition.
href Where the “Plan a trip” and “Enquire” buttons go. The demo’s enquiry page is /enquire/.
subject The subject line of the email you receive.
thanks Where visitors return after Web3Forms sends the form.

Before you go live, send one test enquiry with the method you chose and check that it arrives.

WhatsApp

Set whatsapp to your number as digits only, with the country code, for example 15550104477. The visitor presses Send on WhatsApp and their WhatsApp opens with the request already written. They press send there.

Email

Set email. The visitor’s mail app opens with a new message to you, the subject (your subject and their name) and the request in the body. This needs a mail app on their device.

Web3Forms

Get a free access key at web3forms.com by entering the email address that should receive requests, and paste it into booking.web3formsKey:

send: 'web3forms',
web3formsKey: 'YOUR-ACCESS-KEY',

Polaris sends your subject, your business name as the sender name and a spam trap field (botcheck) with every request. After sending, Web3Forms returns the visitor to booking.thanks, which shows a thank-you panel. Polaris builds this address from url in site.config.ts, so set url to your final domain first.

Formspree

Create a form at formspree.io and paste the form id, the part after /f/ in its address, into booking.formspreeId:

send: 'formspree',
formspreeId: 'abcdwxyz',

Polaris sends the subject field and a hidden spam trap field called _gotcha with every request.

The redirect back to your site is set in Formspree, not in Polaris. In your form’s Settings tab on formspree.io, set the redirect address to https://your-domain/enquire/?sent=1. This is a paid-plan feature of Formspree. On the free plan, visitors see Formspree’s own thank-you page.

The thank-you panel

When the enquiry page is opened with ?sent=1 in its address, the form is replaced by a thank-you panel with links to the trips and to WhatsApp. The words are in src/i18n/ui.ts (the enq.thanks entries).

The booking box

Trip and stay pages have a booking box with the price and a few choices, ending in Request to book. It does not take payment. It sends the visitor to the enquiry page with their choices in the address, and the form fills itself in.

Page The box asks for Address parameters
Trip A departure date, a package level (if the trip has tiers) and travellers trip, date, tier, adults
Stay Check-in, check-out, a room (if the stay has rooms) and guests stay, checkin, checkout, room, adults

On phones, the booking box on a trip or stay page becomes a bar fixed to the bottom of the screen, with the lowest price and the next departure.

You can also link to the form yourself. These parameters work on the enquiry page:

Parameter What it fills in
trip Selects that trip, by file name: /enquire/?trip=markha-valley-trek
stay Selects that stay, by file name
date or checkin The start date, as YYYY-MM-DD. With date, the end date is worked out from the trip’s length.
checkout The end date, as YYYY-MM-DD
adults The number of adults, from 1 to 30. who works too.
tier or room The package or room, written as the first line of the message

The enquiry form

The form asks for a name, email, phone, the trip or stay of interest, dates, adults, children, a budget range, a message and consent. Name, email and consent are required. It checks the fields in the page and shows the errors beside them, and it won’t take dates in the past or an end date before the start.

You can put the form on any page:

Block Use
enquiry (panel or split) The request form on its own, as on /enquire/.
contact (split or cards) Your contact details, with the form if you turn it on (form: true).

Both take preset: trip:markha-valley-trek or preset: stay:willow-yard-homestay to pre-select a trip or stay. A ?trip= or ?stay= address overrides it.

Words and the privacy line

The line under the form, “No payment now. We reply within one working day.”, and the consent text are in src/i18n/ui.ts (enq.reply, book.noPayment and enq.consent). Change them if they aren’t true for your business. The consent line links to /privacy/, so keep that page and make sure it says which form service you use.

The budget ranges in the form (under 1,000, 1,000 to 2,500, 2,500 to 5,000 and over 5,000) are set in src/components/EnquiryForm.astro. They are shown in your currency, but the amounts are not converted, so change them there if they don’t suit your prices.