Willkommen, Gast
Angemeldet bleiben:

THEMA:

If Else Statements for After Submit 7 Monate 3 Wochen her #242010

  • TheMuffinMans Avatar
  • TheMuffinMan
  • Offline
  • Developer
  • Developer
  • Beiträge: 10064
  • Karma: 167
  • Dank erhalten: 807
no problem, I am going to bed now, 4 am already :/

I maybe asked you already, if not please note:

If you are happy, please leave us a small review here to keep us motivated:
(Please turn off your VPN and local Apache prior reviewing as your review might get blocked)

⭐⭐⭐⭐⭐ BreezingForms: extensions.joomla.org/extension/contacts...orms/breezing-forms/

Stay safe!

Regards,
Markus
Folgende Benutzer bedankten sich: sprockt012

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Letzte Änderung: Post by TheMuffinMan.

If Else Statements for After Submit 7 Monate 3 Wochen her #242011

  • TheMuffinMans Avatar
  • TheMuffinMan
  • Offline
  • Developer
  • Developer
  • Beiträge: 10064
  • Karma: 167
  • Dank erhalten: 807

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Letzte Änderung: Post by TheMuffinMan.

If Else Statements for After Submit 7 Monate 2 Wochen her #242199

  • Autor
  • sprockt012
  • Offline
  • Senior Breezer
  • Senior Breezer
  • Beiträge: 96
  • Dank erhalten: 0
One last piece of this that I've not got working yet is include a field value in the conditional subject line. Look for three sections with:

ENTRY CODE'; <==need to put entry code here
$this->execPieceByName('ff_InitLib');
$from = ff_getSubmit('email');
$fromname = 'info@domain.com'; 
$recipient = 'info@domain.com'; /* Change to Your Admin Email Address */

$body = "RECORD_ID: " . $this->record_id . "\n"; // if the body starts here, do not use .= but only = for the assignment.
$body .= "FORMTITLE: " . $this->formrow->title . "\n";
$body .= "SUBMITTEDAT (UTC): " . $this->submitted . "\n";
$body .= "PROVIDER: " . $this->provider . "\n";
$body .= "BROWSER: " . $this->browser . "\n";
$body .= "OPSYS: " . $this->opsys . "\n\n";

$entrycode = '';

foreach ($this->maildata as $data)
{  
    if( $data[_FF_DATA_NAME] == 'idbfSubmissionID'){
        $entrycode = $data[_FF_DATA_VALUE];
    }

// appending to body
                        // $body .= $entrycode[idbfEntryCode] . ': ' . $entrycode[idbfEntryCode] . "\n";
                      
//now we attach the rest, since we got it already above
        $body .= $data[_FF_DATA_NAME] . ': ' . $data[_FF_DATA_VALUE] . "\n";

$subject = 'Email Received [color=red][b]ENTRY CODE[/b][/color]'; <==need to put entry code here
 
if( ff_getSubmit("idbfq2") == "1" or ff_getSubmit("idbfq3") == "1"or ff_getSubmit("idbfq4") == "1"or ff_getSubmit("idbfq5") == "1"or ff_getSubmit("idbfq6") == "1"){
     
     $subject = 'ALERT! Missing [color=red][b]ENTRY CODE[/b][/color]'; <==need to put entry code here
}

// since checkboxes allow multiple values, you have to use ff_getSubmit slightly different:

if( ff_getSubmit("idbfCheckbox") >= "1"){
     
     $subject = 'ALERT! Missing [color=red][b]ENTRY CODE[/b][/color]'; <==need to put entry code here
}

$this->sendMail($from, $fromname, $recipient, $subject, $body);

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Letzte Änderung: Post by sprockt012.

If Else Statements for After Submit 7 Monate 2 Wochen her #242202

  • TheMuffinMans Avatar
  • TheMuffinMan
  • Offline
  • Developer
  • Developer
  • Beiträge: 10064
  • Karma: 167
  • Dank erhalten: 807
Hi,

please check out.
$this->execPieceByName('ff_InitLib');
$from = ff_getSubmit('email');
$fromname = 'info@domain.com'; 
$recipient = 'info@domain.com'; /* Change to Your Admin Email Address */

$body = "RECORD_ID: " . $this->record_id . "\n"; // if the body starts here, do not use .= but only = for the assignment.
$body .= "FORMTITLE: " . $this->formrow->title . "\n";
$body .= "SUBMITTEDAT (UTC): " . $this->submitted . "\n";
$body .= "PROVIDER: " . $this->provider . "\n";
$body .= "BROWSER: " . $this->browser . "\n";
$body .= "OPSYS: " . $this->opsys . "\n\n";

$entrycode = '';

foreach ($this->maildata as $data)
{  
    if( $data[_FF_DATA_NAME] == 'idbfSubmissionID'){
        $entrycode = $data[_FF_DATA_VALUE];
    }

// appending to body
                        // $body .= $entrycode[idbfEntryCode] . ': ' . $entrycode[idbfEntryCode] . "\n";
                      
//now we attach the rest, since we got it already above
        $body .= $data[_FF_DATA_NAME] . ': ' . $data[_FF_DATA_VALUE] . "\n";

$subject = 'Email Received ' . $entrycode; <==need to put entry code here
 
if( ff_getSubmit("idbfq2") == "1" or ff_getSubmit("idbfq3") == "1"or ff_getSubmit("idbfq4") == "1"or ff_getSubmit("idbfq5") == "1"or ff_getSubmit("idbfq6") == "1"){
     
     $subject = 'ALERT! Missing ' . $entrycode; <==need to put entry code here
}

// since checkboxes allow multiple values, you have to use ff_getSubmit slightly different:

if( ff_getSubmit("idbfCheckbox") >= "1"){
     
     $subject = 'ALERT! Missing ' . $entrycode; <==need to put entry code here
}

$this->sendMail($from, $fromname, $recipient, $subject, $body);

I didn't add no color because I highly doubt any email client will allow html in the subject line.
Even if there are a few, most won't and display the raw html instead.

Regards,
Markus
Folgende Benutzer bedankten sich: sprockt012

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

If Else Statements for After Submit 7 Monate 2 Wochen her #242227

  • Autor
  • sprockt012
  • Offline
  • Senior Breezer
  • Senior Breezer
  • Beiträge: 96
  • Dank erhalten: 0
Thank you - that worked like a charm!

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

If Else Statements for After Submit 7 Monate 2 Wochen her #242232

  • TheMuffinMans Avatar
  • TheMuffinMan
  • Offline
  • Developer
  • Developer
  • Beiträge: 10064
  • Karma: 167
  • Dank erhalten: 807
no problem!

If you are happy, please leave us a small review here to keep us motivated:
(Please turn off your VPN and local Apache prior reviewing as your review might get blocked)

⭐⭐⭐⭐⭐ BreezingForms: extensions.joomla.org/extension/contacts...orms/breezing-forms/

Thank you!
Folgende Benutzer bedankten sich: sprockt012

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Moderatoren: ForumSupport
Ladezeit der Seite: 0.056 Sekunden

Angebot

Sommer Special! Alle Mitgliedschaften zum Sonderpreis!

Prio Support, alle Extensions und alle Templates in einem Paket.

Hier geht's zur Bestellung

Crosstec hilft sparen!

Falls Sie neu bei Crosstec sind aber bereits einen Formulargenerator bei einem anderen Hersteller gekauft haben, dann bekommen sie von uns einen Rabatt von 25% auf unsere 1-Jahres und Pro-Mitgliedschaften

Wie Sie an den Rabatt kommen?

Schreiben Sie uns einfach eine kurze Email mit beigelegten Kaufbeleg (z.B. PayPal Quittung) an sales@crosstec.org.

Wir unterstützen die Joomla Community

Crosstec unterstützt weltweit alle offiziellen Joomla! User Groups und Organisatoren von Joomla! Days die bei Joomla.org registriert sind.

Falls das auf dich zutrifft und du eines unserer Produkte brauchst, schreib uns eine kurze Email an info@crosstec.org und du bekommst eine Flatrate-Mitgliedschaft geschenkt!