We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 25497
    • 22 Posts
    I think I just customized the form correctly to have a drop down list subject, and everything seems to work well on the page, but when I receive the email, no subject is displayed at all.

    Here’s what I did:


    // enter "static" in order to use the static subject line
    $subject_type = "";
    $static_subject = "[Web Inquiry] ".$modx->config[’site_url’];

    // Otherwise use an array of possible subjects
    $subject_array[] = "General Inquiry";
    $subject_array[] = "Kauai Real Estate";
    $subject_array[] = "Aspen Properties";

    I’m new at PHP so please bear with me.
    I know modx will save me a lot of time in the long run and it’s been a joy to work with.
      • 25468
      • 18 Posts
      hey unclemeat,

      looks like you just need to add the followinf in the form code at the bottom of the snippet:

      <label for="subject">Subject:</label> 
                <select name="subject" id="subject">
      EOD;
              foreach ($subject_array as $value) {
                  $SendMail .= "<option value=\"{$value}\">{$value}</option>\n";
              }
      
      $SendMail .=<<<EOD
                  </select>
      


      Cheers.
      Gregg
        /Gregg/
        • 36451
        • 264 Posts
        Quote from: romdg at Mar 28, 2006, 05:23 AM


        looks like you just need to add the followinf in the form code at the bottom of the snippet:

        <label for="subject">Subject:</label> etc.
        



        Hi Gregg,

        thank you, you are right. I think this should be mentioned in the snippet. Ryan?