We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 11927
    • 105 Posts
    I’m just learning eForm.

    I have created a dynamic select box from options in a database.

    <select>
    <option value="1">Happy</option>
    <option value="2">Sad</option>
    <option value="3">Grrrr</option>
    </select>
    


    The form works great, but in the email instead of getting Happy, Sad, or Grrrr, I get 1, 2, or 3. This makes sense, kind of. Sometimes it is important to pass the database id instead of the actual text associated with that id. If you look at the select boxes for the web user’s country, it is the same as the above select box. So is there a way to send the text of the select box, instead of the value? Or better yet, analyze the value sent and replace it with the proper text?

    (I may have answered my own question with http://www.partout.info/assets/snippets/eform/docs/eform_example_events.htm#. I’ll let you know.)
      You may or may not want to use the code I write. It&#39;s probably all against the syntax rules of php and MODx. smiley

      Carpet Cleaning
      • 11927
      • 105 Posts
      Yep!!! Just create the function to go back to the database to get the corresponding text for the id and replace.

      (nothing like talking to yourself on a forum) smiley
        You may or may not want to use the code I write. It&#39;s probably all against the syntax rules of php and MODx. smiley

        Carpet Cleaning