WebsiteBaker Logo
  • *
  • Templates
  • Help
  • Add-ons
  • Download
  • Home
*
Welcome, Guest. Please login or register.

Login with username, password and session length
 

News


WebsiteBaker 2.13.6 is now available!


Will it continue with WB? It goes on! | Geht es mit WB weiter? Es geht weiter!
https://forum.websitebaker.org/index.php/topic,32340.msg226702.html#msg226702


The forum email address board@websitebaker.org is working again
https://forum.websitebaker.org/index.php/topic,32358.0.html


R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WB
https://forum.websitebaker.org/index.php/topic,32355.0.html


* Support WebsiteBaker

Your donations will help to:

  • Pay for our dedicated server
  • Pay for domain registration
  • and much more!

You can donate by clicking on the button below.


  • Home
  • Help
  • Search
  • Login
  • Register

  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.12.x) »
  • Modules »
  • Email subject in Miniform
  • Print
Pages: [1]   Go Down

Author Topic: Email subject in Miniform  (Read 9658 times)

Offline astricia

  • Posts: 783
  • Gender: Female
    • netSchmiede24
Email subject in Miniform
« on: April 05, 2019, 10:12:05 AM »
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
Logged

Offline dbs

  • Betatester
  • **
  • Posts: 8914
  • Gender: Male
  • tioz4ever
    • WebsiteBaker - jQuery-Plugins - Module - Droplets - Tests
Re: Email subject in Miniform
« Reply #1 on: April 08, 2019, 09:31:43 AM »
Hi, i'm also interested. Want use a droplet 'groupname' in the subject.
Logged
https://onkel-franky.de

Offline dbs

  • Betatester
  • **
  • Posts: 8914
  • Gender: Male
  • tioz4ever
    • WebsiteBaker - jQuery-Plugins - Module - Droplets - Tests
Re: Email subject in Miniform
« Reply #2 on: April 08, 2019, 10:05:04 AM »
One way could be: put your wished content in a session variable.
Code: [Select]
$_SESSION['miniform']['group'] = $wb->get_group_name();
Put this to $subject in view.php line 49 (in my case the session variable is unnecessary).
Code: [Select]
$subject = $settings['subject'].' '. $wb->get_group_name();
Logged
https://onkel-franky.de

Offline astricia

  • Posts: 783
  • Gender: Female
    • netSchmiede24
Re: Email subject in Miniform
« Reply #3 on: April 10, 2019, 09:01:39 AM »
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
Logged

Offline astricia

  • Posts: 783
  • Gender: Female
    • netSchmiede24
Re: Email subject in Miniform
« Reply #4 on: April 15, 2019, 09:03:42 AM »
*push*

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

Offline dbs

  • Betatester
  • **
  • Posts: 8914
  • Gender: Male
  • tioz4ever
    • WebsiteBaker - jQuery-Plugins - Module - Droplets - Tests
Re: Email subject in Miniform
« Reply #5 on: April 17, 2019, 10:57:25 AM »
Ich versuch es mal, die beste Lösung wird es nicht sein.

Leg dir unter/über Miniform einen neuen Abschnitt Code2(PHP) an.
Code: [Select]
// 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
Code: [Select]
$subject = $settings['subject'];zu
Code: [Select]
$subject = $settings['subject'] . ' - ' . $_SESSION['name'];
« Last Edit: April 17, 2019, 11:03:09 AM by dbs »
Logged
https://onkel-franky.de

Offline astricia

  • Posts: 783
  • Gender: Female
    • netSchmiede24
Re: Email subject in Miniform
« Reply #6 on: April 17, 2019, 11:25:48 AM »
Jaaaa... funktoniert!!! Danke! :-D
Logged

Offline dbs

  • Betatester
  • **
  • Posts: 8914
  • Gender: Male
  • tioz4ever
    • WebsiteBaker - jQuery-Plugins - Module - Droplets - Tests
Re: Email subject in Miniform
« Reply #7 on: May 28, 2019, 12:15:40 PM »
I believe this in code2
Code: [Select]
// 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.
Code: [Select]
$_SESSION['name'] = $_SESSION['mf_r_name'];
Logged
https://onkel-franky.de

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.12.x) »
  • Modules »
  • Email subject in Miniform
 

  • SMF 2.0.19 | SMF © 2017, Simple Machines
  • XHTML
  • RSS
  • WAP2