Skip to main content
Advanced Survey documentation

Create a contact form for members and visitors

A global survey, shown in a custom page of the top menu, makes a contact form: members and visitors send a message, and the administrator receives it as a notification.

Last updated: .

Before you start

You need Survey 2.13.2 and Advanced Survey 1.13.1 or later, and the Custom Pages module.

In the configuration of the Advanced Survey module, tick "Shortcodes" and "Notification on new answer":

Advanced Survey module configuration with shortcodes and answer notifications enabled

For visitors to send a message, guest access must be allowed in Administration > Users > Settings ("Allow visitors limited access to content without an account").

1. Create a global survey

Create the survey in the global surveys (Administration > Global surveys, or the "Surveys" item of the top menu), not in a space:

Creating a global survey named "Contact us"

Add the fields of the form. Keep a text field for the email address: visitors receive the confirmation at this address.

Form builder with the Name, Email and Message fields

In the settings, set the state to "Open (visible, can answer)" and the answers visibility to "Survey creator only", so that the messages stay private:

Survey settings with the state "Open" and the answers visibility "Survey creator only"

Make the survey public with "Change to "Public"" in its "..." menu, so that visitors can see it. If the menu shows "Change to "Private"" instead, the survey is already public:

Menu of a public survey, with the "Change to Private" item

2. Notify the administrator and the sender

In the advanced settings, tick "Answer creator" and "Survey owner" in "People to notify for each new answer". The survey owner is the administrator who created the survey.

You can also tick "Hide in the streams", so that the survey doesn't appear in the dashboard stream: it stays in the list of global surveys.

Advanced settings with "Answer creator" and "Survey owner" selected as people to notify

3. Show the form in a custom page

In the "Shortcode" tab, choose the "Form (to answer the survey)" view type, untick "Logged-in users can save their answer as a draft", and copy the shortcode:

Shortcode tab with the "Form" view type selected

In Administration > Custom Pages, click the "+" button of the "Top Navigation" section and choose the "MarkDown" type. Paste the shortcode in the content, choose an icon in the "Menu settings" panel and the "Always" visibility in the "Visibility" panel:

Custom page editor with the form shortcode pasted

Result

Visitors and members find the contact form in the top menu. Visitors also tick "I'm not a robot":

Contact page opened from the top menu by a visitor

When a message is sent, the administrator receives a notification with its content:

Notification received by the administrator for a new message

Read next

Try HumHub with your own content

A hosted community in two minutes, all paid CUZY modules included, no card asked. Keep everything when you subscribe.

Loading...