How to add a feedback form to a Shop-Script storefront

In your Shop-Script 6 backend provided by Webasyst framework there is convenient built-in functionality for quickly embedding a feedback form on any website page:

  1. Open Site app and navigate to Blocks section.
  2. Select block site.send_email_form.
  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.

Here is how this default feedback form looks, which any website visitor can use to send you a message:

Tips & tricks

How to change recipient email address for feedback messages

Messages which your clients submit via this feedback form are sent as email messages to the address specified in Installer app's settings field "Email".

You can change that value to make all system-wide notifications be sent a new address including those submitted via feedback forms.

If you do not want to change the value of the "Email" field in your Installer, then you can specify 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 the necessity to enter a CAPTCHA code irritates your clients who want to send a feedback messages as fast as possible, you may disable that field. Find the line containing a call of method {$wa->sendEmail(...)} 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.

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