We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 6792
    • 11 Posts
    I’d like to include a mail selector menu with several persons’ names -- easy enough using the excellent examples provided with the snippet (big kudos on the documentation, by the way). But I’d like the initially selected menu item to NOT go to an email address. I want to require the user to pick an option and not go with that default, first item.

    The menu would look like this:

    Please choose your recipient <-- the initially visible item
    Person A
    Person B
    Person C

    Why? Because we’ll have careless users not bothering to select the correct recipient, and the first guy will be getting messages intended for someone else.

    Any idea on how I could do this?

    Thanks!


    David
      • 7455
      • 2,204 Posts
      give the first item no value so value="" and set the eform parameter to 1 like any other requierd field.

      Dimmy
        follow me on twitter: @dimmy01
        • 6792
        • 11 Posts
        I tried that, if I’m understanding your idea. Would the snippet call look like this? With a space and comma as the first &to parameter:

        [!eForm? &formid=`feedbackForm` &to=` ,[email protected],[email protected]` &tpl=`eFeedBackForm` &report=`eFeedBackReport` &thankyou=`eFeedBackThanks` &vericode=`1` &subject=`Web site feedback`!]

        And the eFeedbackForm chunk’s menu:

        <select name="instructor">
        <option value="1">Please select the recipient:</option>
        <option value="2">Joe</option>
        <option value="3">Jim</option>
        <option value="4">Bob</option>
        </select>

        This results in the message being sent to each mail address in &to=.

        Or am I missing the point entirely?
          • 7455
          • 2,204 Posts
          the way the call is done this wil aways result in a mail going out to all the adresses

          make a list like this:
          <select name="instructor">
          <option value="">Please select the recipient:</option>
          <option value="[email protected]">Joe</option>
          <option value="[email protected]">Jim</option>
          <option value="[email protected]">Bob</option>
          </select>

          and your call like this:

          [!eForm? &formid=`feedbackForm` &to=`[+instructor+]` &tpl=`eFeedBackForm` &report=`eFeedBackReport` &thankyou=`eFeedBackThanks` &vericode=`1` &subject=`Web site feedback`!]


          this is how we do it normaly
          and this works great. but if you use PHx then this does not work
            follow me on twitter: @dimmy01
            • 6792
            • 11 Posts
            Now I get it -- that’s great! Thanks very much for your help.