Email subject in Miniform

dbs

I believe this in code2
// Versuch den Inhalt eines Feldes in den Emailbetreff zu bekommen
$_SESSION['name'] = $_SESSION['form']['mf_r_name'];

add a entry in the errorlog.

This works without errorlog entry.
$_SESSION['name'] = $_SESSION['mf_r_name'];
[url="https://onkel-franky.de"]https://onkel-franky.de[/url]

astricia


dbs

#6
Ich versuch es mal, die beste Lösung wird es nicht sein.

Leg dir unter/über Miniform einen neuen Abschnitt Code2(PHP) an.
// Versuch den Inhalt eines Feldes in den Emailbetreff zu bekommen
$_SESSION['name'] = $_SESSION['form']['mf_r_name'];

$_SESSION['name'] hier ist name frei wählbar.
$_SESSION['form']['mf_r_name'] hier ist das richtige Feld einzutragen, so wie es im Formular steht.

Erweitere die view.php z49 von
$subject = $settings['subject'];
zu
$subject = $settings['subject'] . ' - ' . $_SESSION['name'];
[url="https://onkel-franky.de"]https://onkel-franky.de[/url]

astricia

*push*

Still searching for a solution here - can somebody help, please??? :-D

astricia

Hmm... can you explain a little more in detail? The subject should be taken from a certain FIELD (input textfield) from the form. I don't understand where I define this session variable? In a droplet? In the view.php? In the form? Please explain....

Thanks,
Astrid

dbs

One way could be: put your wished content in a session variable.
$_SESSION['miniform']['group'] = $wb->get_group_name();

Put this to $subject in view.php line 49 (in my case the session variable is unnecessary).
$subject = $settings['subject'].' '. $wb->get_group_name();
[url="https://onkel-franky.de"]https://onkel-franky.de[/url]

dbs

Hi, i'm also interested. Want use a droplet 'groupname' in the subject.
[url="https://onkel-franky.de"]https://onkel-franky.de[/url]

astricia

Hi all (especially Ruud),

is it somehow possible to add the content of a certain field in Miniform to the subject of the Email that is sent out?

For a client website I have an inquiry form that has a field "product" - and for each product page, I have the link to the form with the "?product=...", so that this certain field gets already filled in by clicking on the link. The client now requested that the name of the product is already in the SUBJECT of the email being sent to him, not only in the body, so it is easier for him to sort through these inquiries.

Is this somehow possible? (WB 2.12.1 / Miniform 0.14)

Thanks,
Astrid