Forums

field is not included in email

jos 10 Sep, 2008
Hi,

I have on my form 5 radio buttons where the user can select a certain date. These radio buttons are created by php code:
<?php
  $month = isset($_GET['month'])? $_GET['month']: date("m",time());
  $year = isset($_GET['year'])? $_GET['year']: date("Y",time());
  $day = 1;
  for ($i = 0; $i < 6; $i += 1)
  {
    $month += 1;
    if ($month == 13)
    {
      $month = 1;
      $year += 1;
    }
    $dayOfWeek = date("w", mktime(0,0,0,$month,$day,$year));

    if ($dayOfWeek < 4)
    {
      $inloopdag = mktime(0, 0, 0, $month, $day+(4-$dayOfWeek), $year);
    }
    else if ($dayOfWeek == 4)
    {
      $inloopdag = mktime(0, 0, 0, $month, $day, $year);
    }
    else if ($dayOfWeek == 5)
    {
      $inloopdag = mktime(0, 0, 0, $month, $day + $dayOfWeek + 1, $year);
    }
    else if ($dayOfWeek == 6)
    {
      $inloopdag = mktime(0, 0, 0, $month, $day + $dayOfWeek - 1, $year);
    }
    setlocale(LC_ALL, 'nld_nld');

    echo "<input type=\"radio\" value=\"" . date("d-m-y", $inloopdag) . "\" name=\"inloopdag\"><font size=\"1em\">" . strftime("%e %B %Y", $inloopdag) . "</font><br />";
  }
?>


When I fill in the form this field {inloopdag} is not included in the email. Originally it was also not included in the table, because I had no option to create a field for it. That I resolved to temporarily include a hidden field with the same name when creating the table and removing the hidden field afterwards. Now it is correctly included in the table. But I would like to see it also in the e-mail. I've tried creating a custom email template so I know it is in the template, but then the fieldname is not replaced by the field value instead I get the folling line in the email:
inloopdag: {inloopdag}

How can I get this field included in the email?

Jos de Bruijn.
Max_admin 10 Sep, 2008
Hi jos,

which chronofoms version do u have ?
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
jos 11 Sep, 2008
Hi,

I'm using V2.5_J1.5_RC2.1

Jos.
Max_admin 11 Sep, 2008
just keep the hidden field at the top of the HTML box and it will work!
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
jos 15 Sep, 2008
Thank you,
now it works correct.

Jos.
This topic is locked and no more replies can be posted.