EndPreviousNextEnd EndPrint This TopicEnd

Guestbook Setup Guide

The Guestbook module is a Form Builder extension; providing a total solution that engages visitors and gathers feedback.


Step 1 - Configure Guestbook Global Settings

1.Go to Contegro Start > Administration and select Global Module Settings.

Contegro Start > Administration > Global Module Settings

2.Locate and select your Guestbook map in the Module Name column.


3.Update settings as required and click [OK] to save changes.

This task is based on the assumption that the Form Builder module has been installed and activated as per the setup guide.


1.Open the Form Builder Manager.

Contegro Start > Add-On Modules > Form Builder > Manage Forms

2.Build a new form in the Form Builder manager and click [Save].

Build form

Key Info:  (i) Adding a mandatory 'Country' dropdown to the form allows the visitor to specify their location. The map pointer and message pop up will be positioned accordingly in the Guestbook map. (ii) To position the map pointer using Latitude & Longitude, add 2x Hidden Field elements to the form and set the Field ID as 'Longitude' and 'Latitude'.  Additional javascript must be added to the page where the Guestbook and Form Builder modules reside (see Create Guestbook Page task below for more information).

Create Guestbook Page

1.Create a 'Guestbook' page in the Editor.

Optional:  Create a hidden 'confirmation' page which is set as the target page in the Form Builder module (see step 3 below).  The confirmation page displays a message indicating that the form has been submitted successfully.  Alternatively, a confirmation message can be set in the Form Builder module and will replace the form on submission.

2.Add a Guestbook map module.

Add Guestbook module

3.Add a Form Builder module, update the settings as required and click [OK].

Open Form Builder settings

Note - The following settings are required as part of setup:
- Select the 'Guestbook' form created in the above step
- Tick the 'Capture in Database' tickbox if you want to view the form data in the Form Reports
- Set the Email Field ID (using the field id set in the Email form element)
- Add a valid email address to the Form Recipient field


Optional: The Guestbook map pointer will be placed in a default position according to the Country selected in the online form.  If you would like to pinpoint locations with more accuracy, add the following code in a Custom Code module.  This code asks the visitors browser to provide their latitude and longitude. If the browser supports the request, the javascript adds the coordinates to the hidden 'Longitude' & 'Latitude' fields in the online form (see Build and Create Forms task above for more information).
<script type="text/javascript">
Event.observe(window, 'load', function() {                    
                        if ($$('.FormContainer .EnquiryLabelGroup.Latitude input[type=hidden]').length > 1) {
function request_location() {                       
                        if (navigator.geolocation) {
                                                navigator.geolocation.getCurrentPosition(save_location_to_form_fields, location_error, {maximumAge:1000 * 60 * 5}); // maximum age = 5 minutes
function save_location_to_form_fields(position) {
                        $$('.FormContainer .EnquiryLabelGroup.Latitude input[type=hidden]')[1].value = position.coords.latitude;
                        $$('.FormContainer .EnquiryLabelGroup.Longitude input[type=hidden]')[1].value = position.coords.longitude;;
function location_error(error) {
//                   setTimeout( function() {
//                                           add_geolocation_to_form();
//                   }, 3000);

4.Click [Publish] to avoid losing unsaved changes.

Save - Publish

Topic Link