Skip Navigation

[Fermé] Event management

This support ticket is created Il y a 10 années et 9 mois. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

This topic contains 6 réponses, has 2 voix.

Last updated by Rickard Il y a 10 années et 8 mois.

Assigned support staff: bruce.

Auteur
Publications
#8121

Hi,

I think it is great that you will add a tutorial for event managment especially since we are starting work on two multilingual sites this week that are focused around events.

Two things that we have spent some time researching but could use some advice and tips regarding:

1. We need users to be able to register events without being loged in. At the moment Gravity forms seems to be the prefered option when it comes to formhandling with wpml support. If you can make a tutorial or plugin for integration between Gravity forms and types that would be great. (maby there is and we missed it)

2. A event calendar connected to the custom post type. We have looked at different solutions for this and found that the most promesing route at the moment seems to be to build a plugin that bridges to fullcalendar hidden link There are some tutorials on how to do it out in the wild but if a calendar view would come to views or as a seperate plugin that would be just awesome 🙂

We have looked at some commercial plugins that does much of the things we want but consider restrictions on the amount of sites a developer level plugin can be used on unreasonable. We also have been starting to fall in love with types and views since it increase our productivity and want to find more applications for it.

Best,
Rickard

#8125

Hi Rickard,

1) Someone else has done a nice tutorial for this - hidden link

2) We're currently investigating and working on using Views for event management. We need to add some functions to Views to get this to work nicely.

Best regards,
Bruce.

#8360

Hi again,

Thanks for the link, realy well made tutorial!

I have done some testing and only one thing is not working properly atm. Types date fields does not accept the data from gravity correctly. When a single line field gets the data it shows correctly yyyy/mm/dd. When a date field gets the data it always show up with the same date 1970/01/01. Im travelling this week so I havent had time to check out whats going on in the database.

After doing this test i also feel that it would be good with a time field type. Maby thats one of the new functions 🙂

Best regards,
Rickard

#8366

Hi Rickard,

Gravity forms is saving the dates in a different format than what Types is using. At the moment we're not sure how best to handle this.

Best regards,
Bruce.

#10204

Hi again,

We will finish up two projects that need community registration of events at the end of may. Do you think gravity forms date integration can be fixed in time? Without it we will be forced to use cutom php instead of views for theese projects.

Do you know of any other form solution that might work better with types?

Best,
Rickard

#10212

Hi Rickard,

We wont have this by the end of May. What I suggest is that you hook into the Gravity Form submission and convert the date at that point - hidden link

You might need to use something like strtotime function to do this - hidden link

Best regards,
Bruce.

#10307

Hi,

It took some work but in the end I have something that seems to work and might help someone with similar needs:

add_action( 'gform_after_submission', 'gf_to_types_date', 10, 2 );

function gf_to_types_date( $entry, $form ) {

	foreach($form["fields"] as $field){
	  
                            if($field["inputType"] == "date") {
                                $custom_field_name = $field['postCustomFieldName'];
									
									$gf_date = get_post_meta( $entry['post_id'], $custom_field_name, true );
									if( $gf_date ) {
										$types_date = strtotime( $gf_date );
										update_post_meta( $entry['post_id'], $custom_field_name, $types_date );
									}
									
                            }
                    }

}

Le sujet ‘[Fermé] Event management’ est fermé à de nouvelles réponses.