Home › Forums › Calendar Products › Events Calendar PRO › Use event info in gravity form
- This topic has 8 replies, 4 voices, and was last updated 11 years, 5 months ago by
Barry.
-
AuthorPosts
-
January 27, 2012 at 4:25 pm #14300
Ken
ParticipantI see that you can use GF to create a new event, but I am trying to do the opposite.
I have events with a GF placed in it. I want to pass the event title and event start time either in the subject line or to a hidden field that is dynamically populated.
This way I only have one form that will be created and used on each even to work as a registration form or more info form and will be specific to the event it was originally sent on.
Is there anyone that can point me in the right direction as far as what tag or code to place in the form?
January 30, 2012 at 7:44 am #14361Rob
MemberHi Ken. This may be possible; while we can’t build this for you given the limitations of what support we can provide, I’ll see if our dev Jonah can point you in the right direction re: that tag/code you’ve mentioned. Let me see if he has any thoughts we he hits the forum today.
January 30, 2012 at 1:33 pm #14385Ken
ParticipantI have been able to make some progress on this;
/********************************************************************
Add event date parameter to Gravity Forms
********************************************************************/
add_filter('gform_field_value_event_date', 'my_custom_population_function');
function my_custom_population_function($value){
return tribe_get_start_date(null, false, 'F j, Y - g:i a');
}
This will return the date in the body of the email. I created a hidden field in the form that has the “Allow field to be populated dynamically” checked and placed ‘event_date’ in the parameter name field.
Now to see if I can get it in the subject line.
January 30, 2012 at 4:42 pm #14398Rob
MemberAlright. I’ll see in Jonah has a tip on that one this afternoon.
January 31, 2012 at 10:32 am #14446Rob
MemberHi Ken. I talked this over with the dev team today and this is no trivial task; it’d take us a while to dig in and figure out what has to be done here. You’re going to end up having a lot of forums if you’re putting a specific one for each event though…
Unfortunately this isn’t something we can provide much guidance on due to the level of customization required. That being said it’s possible some other users on the forums here (or at the WordPress.org forums) may have a solution or suggestion along these lines so they’re welcome to chime in. Sorry we couldn’t offer up more in an official capacity, though, Ken.
February 1, 2012 at 8:34 am #14524Ken
ParticipantThanks for the responses Rob,
I knew it would be a long shot since GF is not your product but since there was some integration with ECP taking place I was hoping to get some insight on this forum.
The good news is that I have solved the issue with getting the date and the event in the subject line.
After using the above code in the functions.php file I used GF to create the form. I created a hidden field and checked a box next to it to have “Allow field to be populated dynamically” and then entered the parameter “event_date” from the add_filter function added to functions.php file.
That will show the date in the body of the email when returned. I then went to the form notifications section and now noticed that there was now a merge tag added to the dropdown list for the hidden item that was created in the form. I added that merge tag to the subject line as well as the default tag for adding the post title. Here is the final subject line in GF.
Registration for {embed_post:post_title} on {Start Date:8}I am pretty excited about this. Just 1 registration form for all the events or I could create one form for each class and reuse them to have a better way to view all the responses on the backend.
February 1, 2012 at 8:22 pm #14562Rob
MemberMan, that’s awesome! Great work…hopefully other users who come to the forum with a similar issue will find this thread useful. Glad you got this figured out on your own and sorry we couldn’t do more to assist along the way. Let me know what else comes up.
November 11, 2014 at 7:24 pm #878105Courtney
ParticipantThanks for the info! I got the date to come in like Ken mentioned above, but I am unable to get the post title to do the same. Any chance you could explain the steps for this in more detail? When I use the merge for the post title it brings in the Gravity Form title not the Event Title that was just submitted.
November 12, 2014 at 7:25 am #879583Barry
MemberHi Courtney,
Thanks for posting!
Please note that the discussion in this topic took place back in 2012 and numerous things in our plugins, not to mention Gravity Forms, may have changed in the interim 🙂
(Plus, generally speaking, it’s always best to create a new topic of your own rather than post in someone else’s.)
I also need to highlight that the level of support we can provide wherever you integrate with another plugin – Gravity Forms included – is pretty limited. In the “old days” Gravity Forms was popular because Community Events hadn’t yet been created (and, once it was released, of course was not initially as mature a solution as it is now) – so we were more inclined to go that extra step.
Now, however, Community Events would definitely be our recommended plugin if you need a frontend form to accept new event submissions: if you choose to take a different approach that is largely something you’ll need to drive forward by yourself or with the assistance of a developer.
With that in mind I’ll close this topic: if you do have any further questions on this please feel free to post a new topic – but, again, I’d emphasize the level of support we can provide on this one may be limited.
Thanks again!
-
AuthorPosts
- The topic ‘Use event info in gravity form’ is closed to new replies.
