How to add a feedback form to your website

Feedback form example

How to add this form to your website

  1. Open Site app and navigate to “Blocks” section.
  2. Select site.send_email_form block.
  3. Click on the code portion displayed under “Embed block in a page or template”.
  4. Copy the selected code portion and add it to the HTML code of any web page or design template.

How to change recipient email address for feedback form notifications

Messages that your clients submit via a feedback form are sent as email messages to the address specified in Webasyst system settings “Email address for notifications” field.

Change that value to whatever email address you want all system-wide notifications to be sent, including those submitted via a feedback form.

If you do not want to change that setting’s value, then you may specify a recipient’s email address directly in the source code of site.send_email_form block. To do so, add the desired email address between quotes in the code portion shown below; e.g.:

$wa->sendEmail("", $errors)

You can also specify multiple recipients:

Simple format (only addresses)

{$wa->sendEmail(['', ''], $errors)}

Extended format (email addresses + recipient names)

{$wa->sendEmail(['' => 'Name1', '' => 'Name2'], $errors)}

How to remove CAPTCHA field

To protect you from automatically submitted messages (spam), the feedback form contains a CAPTCHA field.

If you believe that CAPTCHA irritates your clients who want to send feedback messages as fast as possible, you may disable the CAPTCHA field. Find the line containing a call of {$wa->sendEmail(...)} method and add the following code before it:

{$wa->storage(['captcha', $wa->app()], '')}

This a way to "tell" Webasyst that an empty CAPTCHA is the correct one, i.e. a feedback message will be successfully sent if no CAPTCHA code has been specified.

Now you will want to remove the field so that it does not mislead your website visitors. Simply find and delete the following code from the site.send_email_form block:

<div class="wa-field">
    <div class="wa-value">
        {if !empty($errors.captcha)}<em class="wa-error-msg">{$errors.captcha}</em>{/if}


    Posting new comments is disabled for this topic.

    Раздел помощи работает на основе приложения «Хаб»