Leads are key to a site build. They provide a way of submitting leads on the Homeflow platform. You will find examples of different lead forms in the following section.
Email type leads are submitted to Homeflow and then on to the agent by ubiquitous web forms. Here’s a simplified version:
Once a lead is sent, a flash message
can be displayed. Find out more about flash messages.
Branch enquiry leads are submitted using the following set of form elements. The HTML can be customised as needed:
If you’re constructing a form on a branch index page, or elsewhere, you can use a branch selector dropdown:
The Homeflow platform allows users to contact staff directly and leads are copied to the agency email address. Here’s a sample form construct:
Most of this is very standard form HTML, though note that the action, hidden employee_id/user_id
and the names of the fields are super important. Without these the submission will fail.
The Ctesius app allows you to register new users to an agency. The standard URL to get to the page is /register
and the registration form needs to live in a new.liquid
file within a user
folder. There are many fields you can use to request information from the client, though name, email and password are absolutely required:
Note: You will always need to have the message either visible or hidden on the form so that the registration lead is submitted properly.
Optionally, you can grab their requirements:
On submit, be in that the lead has sent successfully has failed, the user will get redirected to a flash message, which will populate in the div container. Read more about flash messages.
Like the register form seen above, a valuation request is a lead type in itself. It also shares the same fields as the register form, the only differences are the form directives and one or two hidden fields so that the request hits the correct controller in the Ctesius app. In addition, the valuation form needs to live in a /pages/request_valuation.liquid
file.
Review the register form for the form fields and amend the form head as follows to get up and running:
You can also add client bookings to your valuation lead forms, for example,
Note: booking_time is optional, but booking_day, booking_month and booking_year are all required otherwise the form will fail.
Note: Months should be passed as a number, not a word. For instance January would be “1”. You could use a drop down box for this (and a similar method can be used for the day),
Validation is super easy on the forms. Included in the application.js bundle is jquery.validate. You can add basic validation with the following snippet.
Custom lead forms can be created using custom forms which are explained in more detail here.
To protect our forms from spam, we urge developers to use the reCaptcha tool.
To implement a reCaptcha using Liquid, add this to your form:
white
This will produce a reCaptcha with a white background.
Alternate themes are available. See the ‘themes’ section here for a selection of options that can be used.