Hi,
I would like to add a field that retrieves a variable in $ _GET or $ _POST.
I would like to add this variable in mail.
How can I do?
Hi,
I would like to add a field that retrieves a variable in $ _GET or $ _POST.
I would like to add this variable in mail.
How can I do?
Do you want people to be able to access a form, and have a value in that form populated via GET or POST (pre-populated)?
All values in a form, no matter how they got there (manually entered or pre-populated) are available to use in email notifications.
Please explain more what you're trying to do and someone will help point you to the solution.
I would like to insert a form field with the email you send to another more complete form that takes in $ _GET mail and let others fill in the fields
So assuming you're passing the variable in the URL like so:
http://yoururl.com/yourform/?email=user@gmail.com
Just set the dynamic population parameter of the field you'd like to pre-populate with the query string variable you'd like to populate it from. In this case that would be "email".
http://yoururl.com/yourform/?email=user@gmail.com is nice, but i need to have it slightly different, i don't want to show the email in the url, instead i want to use a variable and get the emailaddres attached to it something like: http://yoururl.com/yourform/?email=recipient1 and where the system knows that user@gmail.com attached to recipient1 and user945@gmail.com is attached to recipient945 for example with a get value before the pipe. Example:
recipient945@gmail.com|recipient945,
recipient1@gmail.com|recipient1,
recipient11@gmail.com|recipient11, and so on
or if someone has a different solution please let me know!
You can do this, send whatever value you want in the query string, but the page that receives that request will need to handle the routing of the emails then. Are you talking about your form being the page to receive the query (so, prepopulate a field in the form with a value) or are you talking about after the form is submitted?
If you want your form to accept the email parameter, you can do this, then use routing in the admin notifications to say "If the email value in the query string is recipient11, send the email notification to chris@rocketgenius.com". This is built in now. Is that what you're trying to do? It seems unrelated to the original poster's question, so I am having a hard time following along. If you post more details about your situation, we'll be happy to help.
this is exactly what i need, how do i accomplish this?
Take a look at this page:
http://gravity.chrishajer.com/pre-populate-everything/
If you don't send any parameters in the URL/query string, the values will be populated with the pre-population values I set in the shortcode when I inserted the form into the page. You won't be doing that I don't think, but here's what the shortcode looks like in case anyone is wondering:
[php]
[gravityform id="61" title="false" field_values="fullname=chris&highschool=Kennedy&fruit=Star&shoe=11"]
In the form, for every field, I have checked the box on the Advanced tab '"Allow field to be populated dynamically". After you do that, you will see a text field that asks for "Parameter Name". For each field, enter the name of the parameter you will use in your query string. In your example, you used 'email' but I would suggest 'recipient' since it's more accurate (you are sending the recipient name, not the email.)
The URL you use in that case will look like this:
http://gravity.chrishajer.com/pre-populate-everything/?recipient=recipient1 (that won't work for my site)
Imagine this though:
http://gravity.chrishajer.com/pre-populate-everything/?fruit=star+fruit
That will pre-populate the "fruit" field with "star fruit" (I used a plus there so the link is not broken here.) You will do the same, but it will be "?recipient=recipient1" where the parameter name for your recipient field is 'recipient'.
That's the first part of the setup. Be sure the field that holds the recipient name is a drop down, radio button or checkbox. It can't be a free form entry. It can be a hidden field if you don't want to show it. You might want to have one of the values be a default if someone arrives at the URL without the query string or strips it off for some reason.
Your routing will be set to say "Send to [enter your email address] if [field drop down] [is or is not] [whatever values are available in the field you selected from the drop down]"
Perform that for each recipient.
It's easier to set up than to explain. Set up the field and allow it to be populated dynamically, first, and get that working, then work on the notification routing. I think it will all make sense once you get into it. Please ask questions as you go along. Thank you.
Hi, i've been digging into this method
http://www.gravityhelp.com/forums/topic/dynamic-population-notification-strategy
almost done setting it up... if i've got questions can i ask you to assist?
i think i've got a issue with the " $account = $lead[4];" what is this and what should it do?
and there's a issue when submitting the form, can give you the form url in a PM so if you got some spare time you can check it out
please check and submit the form to see the error
http://www.ves.nl/4499-2/?accountID=1
and the list function also does not work!
Please send an email to chris@rocketgenius.com with a link to this topic and the questions you have at this point and I will see if I can help you.
in your inbox!
i've used all the settings as in the example, but still no luck... HELP
Hi Peter - I have your emails and will look at this on Friday. Thanks for your patience.
thanks in advance!
@peter, can you resend your email or tell me what address it came from? I received a lot of email on Friday and seem to have misplaced yours. Thank you.
in your mailbox again
it's the same as my account email address peterlammers ät msñ døt cóm
Peter, I am not receiving your emails. Let me send you one then reply to me. Thanks.
I have emailed peter the solution. We'll update this topic when the problem is ultimately resolved. The correct field was being populated by the query string, but the code was looking at the wrong $lead[id].