Forum

Thread tagged as: Problem, Error, Forms

problems with email-template used for a form

I'm busy with making a form for my customer. All worked as expected until I started working on the email-template.

First I noticed that I couldn't get a radio-field to show up in the email (this is solved!).

Now I noticed two other problems:

  1. In Form-Options when I choose a mail template for 'sending email' and a 'plain text only' for the 'autoresponse'. Both emails get send with the template.

  2. The substitution of fields ( like {name} ) in the 'email introduction text' doesn't work when I select a mailtemplate. This behaviour occurs also for the situation as mentioned in (1.)

René Banus

René Banus 0 points

  • 6 years ago
Rachel Andrew

Rachel Andrew 394 points
Perch Support

We need to see your template and your Diagnostics Report to be able to help.

I've included the email template and the complete diagnostics report.

My email template looks like this:

<html>
<head>
    <title><perch:email id="email_subject" /></title>
</head>
<body>
  <h1>Aanmelding Retraite(s)</h1>
  <p><perch:email id="email_message" encode="false" /></p>
  <table>

    <th>Aangemeld voor</th>
      <td><perch:email id="Aanmelding-1" />,&nbsp;<perch:email id="Aanmelding-2" /></td>
    </tr>

    <tr>
      <th>Naam</th>
      <td><perch:email id="voornaam" />&nbsp;<perch:email id="achternaam" /> (<perch:email id="geslacht" />)</td>
     </tr>
    <tr>
      <th>Geboortedatum</th>
      <td><perch:email id="gebdatum" /></td>
    </tr>

    <tr>
      <th>Straat en nummer</th>
      <td><perch:email id="straat" /></td>
    </tr>    
    <tr>
      <th>Postcode en plaats</th>
      <td><perch:email id="postcode" /> <perch:email id="plaats" /></td>
    </tr>
    <tr>
      <th>Telefoonnummer</th>
      <td><perch:email id="telnr" /></td>
    </tr>    

    <tr>
      <th>Email</th>
      <td><perch:email id="email" /></td>
      </tr>

    <tr>
      <th>Bericht</th>
      <td><perch:email id="bericht" encode="false" /></td>
      </tr>
  </table>
</body>
</html>

Diagnostics report

PERCH INFORMATION

Perch: 2.8.2
Production mode: Production (100)
Installed apps: content (2.8.2), assets (2.8.2), categories (2.8.2), perch_forms (1.8.2), regs (1.0)
DB driver: PDO
DB tables: perch2_categories, perch2_category_counts, perch2_category_sets, perch2_content_index, perch2_content_items, perch2_content_regions, perch2_events, perch2_events_categories, perch2_events_to_categories, perch2_forms, perch2_forms_responses, perch2_my_sample_things, perch2_navigation, perch2_navigation_pages, perch2_page_templates, perch2_pages, perch2_resource_log, perch2_resource_tags, perch2_resources, perch2_resources_to_tags, perch2_settings, perch2_user_privileges, perch2_user_role_privileges, perch2_user_roles, perch2_users, pivotx_categories, pivotx_chapters, pivotx_comments, pivotx_entries, pivotx_extrafields, pivotx_pages, pivotx_tags, pivotx_trackbacks, pivotx_ultimatefields, rc_pivotx_categories, rc_pivotx_chapters, rc_pivotx_comments, rc_pivotx_entries, rc_pivotx_extrafields, rc_pivotx_pages, rc_pivotx_tags, rc_pivotx_trackbacks
Users: 3
App runtimes:
<?php
    $apps_list = array(
        'content',
        'categories',
        'perch_forms',  
    );
?>
Editor plug-ins: markitup
H1: f67e6186d30544c05f274b4211c6e27e
L1: ec6300a6d2ff75639f81b73db5573480
headerColour: #ffffff
content_singlePageEdit: 0
helpURL:
siteURL: /
hideBranding: 1
content_collapseList: 0
lang: en-gb
latest_version: 2.7.10
headerScheme: light
dashboard: 1
content_hideNonEditableRegions: 0
update_2.2.3: done
on_sale_version: 2.8.2
update_2.4.5: done
content_frontend_edit: 0
update_2.4.6: done
update_2.5.4: done
update_2.7.10: done
update_2.8.2: done
PERCH_DEVELOPMENT: 10
PERCH_STAGING: 50
PERCH_PRODUCTION: 100
PERCH_DB_USERNAME: suryadevinl
PERCH_DB_SERVER: mysql.suryadevi.nl
PERCH_DB_DATABASE: suryadevinl
PERCH_DB_PREFIX: perch2_
PERCH_TZ: Europe/Amsterdam
PERCH_EMAIL_FROM: r.banus@planet.nl
PERCH_EMAIL_FROM_NAME: rene banus
PERCH_LOGINPATH: /perch
PERCH_PATH: D:\www\suryadevi.nl\www\perch
PERCH_CORE: D:\www\suryadevi.nl\www\perch\core
PERCH_RESFILEPATH: D:\www\suryadevi.nl\www\perch\resources
PERCH_RESPATH: /perch/resources
PERCH_HTML5: 1
PERCH_DEBUG:
PERCH_RUNWAY:
PERCH_ERROR_MODE: DIE
PERCH_DATE_LONG: %d %B %Y
PERCH_DATE_SHORT: %d %b %Y
PERCH_TIME_SHORT: %H:%M
PERCH_TIME_LONG: %H:%M:%S
PERCH_PREVIEW_ARG: preview
PERCH_TEMPLATE_PATH: D:\www\suryadevi.nl\www\perch\templates
PERCH_DEFAULT_DOC: index.php
PERCH_DEFAULT_EXT: .php
PERCH_PRODUCTION_MODE: 100
PERCH_RWD:
PERCH_HTML_ENTITIES:
PERCH_SSL:
PERCH_STRIPSLASHES:
PERCH_PROGRESSIVE_FLUSH: 1
PERCH_AUTH_PLUGIN:
PERCH_DB_CHARSET: utf8
PERCH_DB_PORT:
PERCH_DB_SOCKET:
HOSTING SETTINGS

PHP: 5.4.37
Zend: 2.4.0
OS: WINNT
SAPI: cgi-fcgi
Safe mode: not detected
MySQL client: mysqlnd 5.0.10 - 20111026 - $Id: c85105d7c6f7d70d609bb4c000257868a40840ab $
MySQL server: 5.1.72-log
Extensions: Core, bcmath, calendar, ctype, date, ereg, filter, ftp, hash, iconv, json, mcrypt, SPL, odbc, pcre, Reflection, session, standard, mysqlnd, tokenizer, zip, zlib, libxml, dom, PDO, openssl, SimpleXML, wddx, xml, xmlreader, xmlwriter, cgi-fcgi, curl, fileinfo, gd, gettext, intl, imap, mbstring, exif, mysql, mysqli, Phar, pdo_mysql, PDO_ODBC, pdo_pgsql, pdo_sqlite, pgsql, soap, sqlite3, tidy, xsl, pdo_sqlsrv, sqlsrv, com_dotnet, phalcon, mhash
GD: Yes
ImageMagick: No
PHP max upload size: 10M
PHP max form post size: 10M
PHP memory limit: 128M
Total max uploadable file size: 10M
Resource folder writeable: Yes
Session timeout: 24 minutes
Native JSON: Yes
Filter functions: Yes
Transliteration functions: Yes
_FCGI_X_PIPE_: \\.\pipe\IISFCGI-b5755c18-7b7d-44a8-b4d8-71705837563c
PHP_FCGI_MAX_REQUESTS: 10000
PHPRC: c:\vevida\php54\php.ini
ALLUSERSPROFILE: C:\ProgramData
APPDATA: C:\Users\IUSR_95239\AppData\Roaming
APP_POOL_CONFIG: C:\inetpub\temp\apppools\suryadevi.nl\suryadevi.nl.config
APP_POOL_ID: suryadevi.nl
CommonProgramFiles: C:\Program Files (x86)\Common Files
CommonProgramFiles(x86): C:\Program Files (x86)\Common Files
CommonProgramW6432: C:\Program Files\Common Files
COMPUTERNAME: NET3-NL-IIS-208
ComSpec: C:\Windows\system32\cmd.exe
FP_NO_HOST_CHECK: NO
LOCALAPPDATA: C:\Users\IUSR_95239\AppData\Local
NUMBER_OF_PROCESSORS: 8
OS: Windows_NT
Path: C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Dell\SysMgt\shared\bin;C:\Program Files (x86)\Dell\SysMgt\oma\bin;C:\Program Files (x86)\Dell\SysMgt\idrac;
PATHEXT: .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
PROCESSOR_ARCHITECTURE: x86
PROCESSOR_ARCHITEW6432: AMD64
PROCESSOR_IDENTIFIER: Intel64 Family 6 Model 26 Stepping 5, GenuineIntel
PROCESSOR_LEVEL: 6
PROCESSOR_REVISION: 1a05
ProgramData: C:\ProgramData
ProgramFiles: C:\Program Files (x86)
ProgramFiles(x86): C:\Program Files (x86)
ProgramW6432: C:\Program Files
PSModulePath: C:\Windows\system32\WindowsPowerShell\v1.0\Modules\
PUBLIC: C:\Users\Public
SystemDrive: C:
SystemRoot: C:\Windows
TEMP: C:\Users\IUSR_9~2\AppData\Local\Temp
TMP: C:\Users\IUSR_9~2\AppData\Local\Temp
USERDNSDOMAIN: AD.VEVIDA.NET
USERDOMAIN: VEVIDA
USERNAME: IUSR_95239
USERPROFILE: C:\Users\IUSR_95239
windir: C:\Windows
ORIG_PATH_INFO: /perch/core/settings/diagnostics/index.php
URL: /perch/core/settings/diagnostics/index.php
SERVER_SOFTWARE: Microsoft-IIS/8.0
SERVER_PROTOCOL: HTTP/1.1
SERVER_PORT: 80
SERVER_NAME: yvonneoosterholt.nl
SCRIPT_NAME: /perch/core/settings/diagnostics/index.php
SCRIPT_FILENAME: d:\www\suryadevi.nl\www\perch\core\settings\diagnostics\index.php
REQUEST_URI: /perch/core/settings/diagnostics/?extended
REQUEST_METHOD: GET
REMOTE_PORT: 52547
REMOTE_HOST: 86.89.214.210
REMOTE_ADDR: 86.89.214.210
QUERY_STRING: extended
PATH_TRANSLATED: d:\www\suryadevi.nl\www\perch\core\settings\diagnostics\index.php
LOCAL_ADDR: 77.94.250.175
INSTANCE_META_PATH: /LM/W3SVC/95239
INSTANCE_NAME: SURYADEVI.NL
INSTANCE_ID: 95239
HTTPS: off
GATEWAY_INTERFACE: CGI/1.1
DOCUMENT_ROOT: d:\www\suryadevi.nl\www
APPL_PHYSICAL_PATH: d:\www\suryadevi.nl\www\
APPL_MD_PATH: /LM/W3SVC/95239/ROOT
logio_request_headers_size: 534
IIS_UrlRewriteModule: 7.1.0761.0
WEBSOCKET_VERSION: 13
HTTP_X_REQUEST_URI: /perch/core/settings/diagnostics/
HTTP_USER_AGENT: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/600.3.18 (KHTML, like Gecko) Version/7.1.3 Safari/537.85.12
HTTP_REFERER: https://yvonneoosterholt.nl/perch/core/settings/diagnostics/
HTTP_HOST: yvonneoosterholt.nl
HTTP_COOKIE: _ga=GA1.2.1568887118.1414612835; cmsa=1; PHPSESSID=622t8ra4rsosoisaoagmafcoruv47gt0
HTTP_ACCEPT_LANGUAGE: en-us
HTTP_ACCEPT_ENCODING: gzip, deflate
HTTP_ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
HTTP_CONNECTION: keep-alive
FCGI_ROLE: RESPONDER
PHP_SELF: /perch/core/settings/diagnostics/index.php
REQUEST_TIME_FLOAT: 1426164494,957
REQUEST_TIME: 1426164494

My form template looks like this

<perch:form id="aanmelding-retraite" method="post" app="perch_forms" class="retraite">



    <div class="check_retraite">
        <p>
            <perch:input type="checkbox" value="Retraite Mei 2015" id="Aanmelding-1" label="Retraite Mei 2015" />
            <perch:label for="Aanmelding-1">Bezinning/stilte Retraite - 22 tot 29 Mei 2015, Kalmthout</perch:label>
        </p><p>
            <perch:input type="checkbox" value="Retraite Juli 2015" id="Aanmelding-2" label="Retraite Juli 2015" />
            <perch:label for="Aanmelding-2">Stilte Retraite Week - 10 tot 17 Juli 2015, Kalmthout</perch:label>
        </p>
    </div>

    <div>
        <perch:label for="voornaam">Voornaam</perch:label>
        <perch:input type="text" id="voornaam" required="true" label="voornaam" />
        <span class="form-error"><perch:error for="voornaam" type="required">Vul aub je voornaam in</perch:error></span>
    </div>
    <div>
        <perch:label for="achternaam">Achternaam</perch:label>
        <perch:input type="text" id="achternaam" required="true" label="achternaam" />
        <span class="form-error"><perch:error for="achternaam" type="required">Vul aub je achternaam in</perch:error></span>
    </div>

    <div class="geslacht"> 
        <perch:label class="mainlabel" for="geslacht">Man/Vrouw</perch:label>
        <perch:input type="radio" id="geslacht" name="geslacht" options="Man,Vrouw" />
    </div>


    <div>
        <perch:label for="gebdatum">Geboortedatum</perch:label>
        <perch:input type="text" id="gebdatum" required="true" label="gebdatum" placeholder="21 jan 1974" />
        <span class="form-error"><perch:error for="gebdatum" type="format">Vul aub je geboortedatum in</perch:error></span>
    </div>



    <div>
        <perch:label for="straat">Straat en Huisnr</perch:label>
        <perch:input type="text" id="straat" required="true" label="straatnaam" />
        <span class="form-error"><perch:error for="straat" type="required">Vul aub je straatnaam en huisnr in</perch:error></span>

    </div>


    <div>
        <perch:label for="postcode">Postcode</perch:label>
        <perch:input type="text" id="postcode" required="true" label="postcode" />
        <span class="form-error"><perch:error for="postcode" type="required">Vul aub je postcode in</perch:error></span>
    </div>

    <div>
        <perch:label for="plaats">Plaatsnaam</perch:label>
        <perch:input type="text" id="plaats" required="true" label="plaats" />
        <span class="form-error"><perch:error for="plaats" type="required">Vul aub je plaatsnaam in</perch:error></span>
    </div>

    <div>
        <perch:label for="telnr">Telefoonnummer</perch:label>
        <perch:input type="text" id="telnr" required="true" label="telnr" />
        <span class="form-error"><perch:error for="telnr" type="required">Vul aub je telefoonnummer in</perch:error></span>
    </div>

    <div>
        <perch:label for="email">Email</perch:label>
        <perch:input type="email" id="email" required="true" label="Email" placeholder="email@provider.nl" />
        <span class="form-error"><perch:error for="email" type="required">Vul je email adres in</perch:error></span>
        <span class="form-error"><perch:error for="email" type="format">Controleer of je emailadres juist is geschreven</perch:error></span>
    </div>


    <div class="bericht">
        <perch:label for="bericht">Opmerkingen</perch:label>
        <perch:input type="textarea" id="bericht" size="l" required="false" label="Bericht" />
    </div>

    <perch:content id="alineatekst" type="textarea" size="m" markdown="true" label="Alinea Tekst" required="true"/>


    <div>
        <perch:input class="button" type="submit" id="submit" value="Opsturen aanmelding" />
    </div>


</perch:form>

Drew McLellan

Drew McLellan 2638 points
Perch Support

Thanks, I've logged those issues, so we'll take a look at them the next time that app is updated.