ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Anyone know if this is possible with FreeForm or Email Module?

October 08, 2007 4:15pm

Subscribe [2]
  • #1 / Oct 08, 2007 4:15pm

    Deron Sizemore

    1033 posts

    What I want to happen is have one contact form on a site where it’s possible to email different people (maybe ten or so).

    What I had envisioned was one form with a drop down list of the different possible people that could be emailed so the user could select the name of the person of who they wished to get in contact with.

  • #2 / Oct 09, 2007 9:45am

    Deron Sizemore

    1033 posts

    bump (got pushed off the first page real quick) 😊

  • #3 / Nov 14, 2007 2:53pm

    Geoff Towle

    330 posts

    I have a client who wants the same thing.  They did it in ASP but I’m trying to figure out how to convert it to work in EE.  You can see their code on the the EE page here.

    They also wanted the email addresses “hidden” so as to avoid SPAM.  Is this also possible with either the Email Module or Freeform?

    Thanks.

  • #4 / Nov 14, 2007 7:41pm

    Deron Sizemore

    1033 posts

    Hey Geoff,

    I’ve contacted a couple people in regards to this with FreeForm and it’s evidently not possible without some heavy customization.

    So, with that said, it is possible with the Email Module, I just like the flexibility of FreeForm to add my own thank you pages and manage everything better, that’s why I was trying to figure out a way to do it with FreeForm.

    If you want to do this with the Email Module, here’s the link: http://expressionengine.com/wiki/Select_Contact_Email_Form/

  • #5 / Nov 14, 2007 8:17pm

    Geoff Towle

    330 posts

    Deron-

    Very cool, thanks.  I’ve added the code from that Wiki entry and am getting this error upon submit:  your email had no valid recipients.

    I changed one of the generic recipients to my name and email address to test.

    Any ideas?

  • #6 / Nov 14, 2007 9:30pm

    Deron Sizemore

    1033 posts

    Hey Geoff,

    Hmm, I’ve never experienced this issue before. Can you post the code you’re using? Or, are you using the code exactly as it is in the wiki just changing the email addresses?

    Also, do you have PHP enabled on that template? What about double checking to make sure you have the Email Module enabled (I’ve done it before, lol)?

  • #7 / Nov 14, 2007 10:01pm

    Geoff Towle

    330 posts

    Deron-

    I’ve double-checked that yes, PHP is enabled and Email module is installed.

    Here’s the code for the form:

    {exp:email:contact_form user_recipients="false"}
    
                <h1>Contact Form</h1>
                
                    <select name="recipients" id="recipients">
                    <option selected="selected">-- Select Recipient --</option>
                    <option value="<?php echo base64_encode('[email protected]'); ?>">Geoff Towle</option>
                    <option value="<?php echo base64_encode('[email protected]'); ?>">Person Two</option>
                    <option value="<?php echo base64_encode('[email protected]'); ?>">Person Three</option>
                    </select>
                    
                    <label for="from">Your Email:</label>
    
                    <input type="text" id="from" name="from" size="40" maxlength="35" />
                    
                    <label for="subject">Subject:</label>
    
                    <input type="text" id="subject" name="subject" size="40"/>
                    
                    <label for="message">Message:</label>
    
                    <textarea id="message" name="message" rows="18" cols="50"></textarea>
                    
                    <input name="submit" type='submit' value='Send' />
                
                {/exp:email:contact_form}
  • #8 / Nov 14, 2007 10:25pm

    Deron Sizemore

    1033 posts

    hmm, seems weird.

    How about changing user_recipients=“false” to “true”? Probably won’t work, but worth a shot.

    Also, maybe try a search for keywords “your email had no valid recipients” and see what pops up. I did a quick search and it looked like quite a few threads popped up so maybe someone has had similar problems and fixed them. I didn’t have time to look through them.

  • #9 / Nov 15, 2007 12:03am

    Geoff Towle

    330 posts

    OK - I found a thread that offered a variation on the Wiki code that works.  The thread is here:  http://ellislab.com/forums/viewthread/52752/

    I’m also going to update the Wiki.

  • #10 / Nov 15, 2007 9:56am

    Deron Sizemore

    1033 posts

    Great, glad you got it sorted out.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases