Event Date and dynamyc field with gravity form
-
Hello,
EM unfortunatly do not have forms conditionnal field; so I am trying to use Gravity and populate field dynamicly.
It’s working fine for Event Name field with this:
// Populate gravity forms Event Name Field with Event Name add_filter('gform_field_value_event_name', 'populate_event_name'); function populate_event_name($value){ global $EM_Event; $event_name_EM = $EM_Event->output('#_EVENTNAME'); return $event_name_EM; }
where “event_name” is the parameter to put in the gravity option : allow dynamic…etc…
For event date it looks like much more difficult and until now I can’t make it work with “event_date” as gravity field value :
add_filter('gform_field_value_event_date', 'populate_event_date'); function populate_event_date($value){ global $EM_Event; $event = em_get_event($post->ID, 'post_id'); $start_date_EM = $event->event_start_date; $start_date_EM = str_replace('-', '/', $start_date_EM); return strtotime($start_date_EM); }
Any help ?
By the way special message to EM devlopper: why don’t you offer user the choice to use either gravity, woocommerce or your solution for forms and payement ? It could make your pro version a “must have”.
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Event Date and dynamyc field with gravity form’ is closed to new replies.