zikula-modules / Formicula

A template-driven form mailer for Zikula

Home Page:https://ziku.la

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Allow custom email subject lines for each form

hvorragend opened this issue · comments

Right now only the user confirmation emails can have custom subject lines, but even they are connected to the contact, rather than to the specific form.

All emails to the contacts resulting from any form submission have the subject line "Site Name - "Contact Name". Which is coded into modules\Formicula\pnuserapi.php about line 235.

It would be an advantage to be able to customize the subject of the emails to match the purpose of the form. Right now if you have several forms like

General Contact
Job Application
Event Registration

which all have the same contact available, they all have the same subject line.

Couldn't the form subject be defined by a hidden field in the form template itself? You can already define other form specific options using hidden fields. The default could remain as it is, with the hidden value as an override where needed.
Change History
comment:1 Changed 3 months ago by espaan

Milestone changed from 2.2 to 3.0.0
Severity changed from blocker to medium severity
Status set to pending-review

This would indeed make a lot of sense. To make more configurable items in the forms possible.

There should be more options like adminformat and userformat, so adminsubject and usersubject for instance. And always with empty default to have BW compatibility.

I have something standing ready (and in use) for this. I am wondering about the best way to place the fields. adminformat and userformat are plain fields now, should we place adminsubject and usersubject on that level too?

I'm using the adminsubject for subscribe/unsubscribe mails for a mailing list. The email subject (subscribe/unsubscribe) is a user choosable adminsubject in the form. So then userdata[adminsubject] would make more sense.

Opinions?

Example in the form (old style form, so not based on arrays):

<p>
    <label for="adminsubject">Aan- of afmelden voor de nieuwsbrief&nbsp;:</label><br />
    <select class="formborder" id="adminsubject" name="adminsubject">
    <option value="Subscribe" selected="selected">Aanmelden</option>
    <option value="Unsubscribe">Afmelden</option>
    </select>
</p>