PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Link to a specific email address in a pull-down menu

  1. 3cstudio
    Member

    Can anyone tell this Gravity Forms n00b how to link to a specific address/"name" in a To: pull-down if I want to use a form for listing all sorts of people to be able to send-to?

    So that, instead of just going to the generic contact form, the To: pull-down already says it will be To: John Doe (which is tied to his address: john@doe-main.com). I am told that involves setting the query variable -- so how is that done, specifically? Hopefully my scenario makes sense to troubleshoot?

    Thanks in advance!

    Steve C.

    Posted 12 years ago on Wednesday October 3, 2012 | Permalink
  2. This is simpler than you think. What you want is called routing and is available on the notifications tab of your form.

    Add all your names to your drop down in the form builder. Save your form. Then go to the Notifications tab. Instead of checking the radio button "Email" for "Send to Email", select "Routing". After you do that, you will be shown some additional inputs where you are able to say "If John Doe is selected from the drop down, send an email to johndoe@example.com".

    If you get stuck on those notifications, let us know.

    Posted 12 years ago on Wednesday October 3, 2012 | Permalink
  3. 3cstudio
    Member

    Thanks Chris, yes -- that part I get & already have that in place... but, when linking to those items in the pull-down, what does that URL look like so that the person they try to reach is already showing in the pull-down when referred to that form from another page? Something like: http://example.com/?name=john_doe (or whatever is in the Value field?), or is that not proper? I can't get examples (similar to the one just listed above) to work...

    Thanks again!

    Steve C.

    Posted 12 years ago on Wednesday October 3, 2012 | Permalink
  4. Are you trying to pre-select one of the drop down names by sending a specific link to someone? So, if your form lives here http://example.com/contact-us/ you can change who is pre-selected by sending a link like http://example.com/contact-us/?name=John%20Doe ?

    If that is what you want to do, you need to check the box "Allow field to be populated dynamically" and then in the subsequent box, enter a "parameter name". In your case, you used a parameter name of "name". Once you do that and save the form, if you use a link like you just posted, and the value you send matches exactly a value in your drop down, that will be pre-selected when the form loads.

    Documentation http://www.gravityhelp.com/documentation/page/Using_Dynamic_Population#Query_String

    Posted 12 years ago on Wednesday October 3, 2012 | Permalink
  5. 3cstudio
    Member

    ... so the form URL is: http://madisonsquarechurch.dreamhosters.com/contact-us/ and the "name" I'm testing is: http://madisonsquarechurch.dreamhosters.com/contact-us/?name=Steve+Colthorp which gives me a 404 page. Thoughts?

    Posted 12 years ago on Wednesday October 3, 2012 | Permalink
  6. 3cstudio
    Member

    Sorry, didn't see your update before I posted -- reading it now.

    Posted 12 years ago on Wednesday October 3, 2012 | Permalink
  7. There might be a problem using "name" as the parameter. That URL with your query string should not return a 404. It should just load your form and ignore the query string. Take a look at what happens with this URL http://madisonsquarechurch.dreamhosters.com/contact-us/?listing=anything

    That will load the form but not pre-select a name. Please change the parameter name for the field, in your form, to fullname or something, then use the same in the query string, and I think you will find that it works.

    Posted 12 years ago on Wednesday October 3, 2012 | Permalink
  8. 3cstudio
    Member

    Yes, I have (in the Advanced tab):
    1. "Allow..." -- checked.
    2. "Param..." -- 'name'
    3. Choice = Steve Colthorp
    4. testing URL:
    http://madisonsquarechurch.dreamhosters.com/contact-us/?name=Steve%20Colthorp
    5. resultant 404 Not Found error page....

    Not sure where things are going wrong yet. :-/

    Posted 12 years ago on Wednesday October 3, 2012 | Permalink
  9. Please see my previous reply. Don't use name as the parameter. Try using fullname - I bet it will work.

    We're crossing replies here.

    Posted 12 years ago on Wednesday October 3, 2012 | Permalink
  10. 3cstudio
    Member

    Yep! Thanks Chris - we did indeed cross replies, and 'fullname' works like a charm.

    Thanks again,

    Steve C.

    Posted 12 years ago on Thursday October 4, 2012 | Permalink
  11. 3cstudio
    Member

    1 small snag remaining.
    On: http://madisonsquarechurch.dreamhosters.com/contact-us-staff/, Audrey L. and Bill W. are not showing to their respective drop-down item when their Email link is clicked -- they both are showing "-- Choose A Recipient --", which is the default item in the drop-down instead of their names.
    On the Notifications > Routing section, those 2 fields won't save when I click Save Settings -- rather, they both revert to Cisco G. for some reason. I tried to Delete (-) and reset those 2 addresses to no avail. Can you assist?

    Posted 12 years ago on Thursday October 4, 2012 | Permalink
  12. I see how this is working now, but I can't help you from here. It's something in how it's configured. There is a mismatch between the name and value or something like that. If you would like me to take a look, please email a WordPress administrator login to chris@rocketgenius.com and I will have a look.

    Posted 12 years ago on Thursday October 4, 2012 | Permalink
  13. 3cstudio
    Member

    Thanks Chris. It's on its way.

    Posted 12 years ago on Thursday October 4, 2012 | Permalink
  14. 3cstudio
    Member

    Let me know if it arrived & if you have any luck!

    Posted 12 years ago on Friday October 5, 2012 | Permalink
  15. I received the email but I have not been able to figure the problem out. I wonder what would happen if you turn off the enhanced interface for the drop down? I did not modify your form: I just poked around and everything seemed to be configured correctly.

    Posted 12 years ago on Friday October 5, 2012 | Permalink
  16. 3cstudio
    Member

    Chris,

    I think I figured out the issue, for the most part:

    In the Form Editor > Drop Down, I deleted the 2 errant Choices. Where things seem to get messed up is when I went to re-populate those Choices -- I initially clicked the circle+ button just before those 2 to add a new Choice to the drop-down list again. This (for some unknown reason?) seemed to Route both of those redo's to Cisco G. (the 5th Choice on the list). When I went to the bottom of the list to re-add those 2 Choices, their names remained in the Routing fields instead of getting replaced by the Cisco G. name. Could it be an issue of next-in-line use of the + button vs. going to the bottom of the list and using the last name's + button to re-add errant Choices for a drop-down list?

    In a nutshell: If I tried to re-place the 2 errant Choices to maintain the alpha order of the list, it was errant -- but if I simply went to the end of the list and added them back in, it worked perfectly.

    Let me know if this makes muddy sense or not.

    Steve C.

    Posted 12 years ago on Friday October 5, 2012 | Permalink
  17. That might be related. The order in which things are configured when using routing or conditional logic matters. If you configure routing then modify the drop downs, the routing may no longer work. I would delete the routing, then configure the drop down exactly how you want it, then configure routing.

    The other thing which straightens things out sometimes is to export the form, then reimport it. That straightens out the rules sometimes. Let us know if you get it working correctly.

    Posted 12 years ago on Saturday October 6, 2012 | Permalink
  18. 3cstudio
    Member

    Chris,

    Thanks for the response -- I have it working properly now, and basically did as you suggested before you suggested it. :) Now, all names are relayed to their appropriate Routing info. Not sure if it warrants consideration of a fix on the next version update to figure out a way to make addition/placement of the items in the drop-down be proper... or if it is even something that is fixable?

    Thanks again,

    Steve C.

    Posted 12 years ago on Monday October 8, 2012 | Permalink
  19. Thanks Steve. We'll take a look at it.

    Posted 12 years ago on Monday October 8, 2012 | Permalink

This topic has been resolved and has been closed to new replies.