File Upload
-
Hi,
Is it possible to add a file upload field instead of the image upload field?Right now if I try to upload a file sheet it throws me an error ..not the correct format.Is there a way to alter that feature.
Thanks in advance
Diona
-
Hi,
in order to do that, you would need to make several changes in the events manager source files. Note however that this wouldn’t at all compatible with future EM updates.
If you want to do this, you can trace the relevant code bits by starting to look inside \events-manager\templates\forms\event\featured-image-public.php, \events-manager\templates\forms\event-editor.php and \events-manager\classes\EM-Event.php
You might be able to introduce a separate file upload form alongside the existing form, which could be significantly easier and upgrade safe, but you would still need to start looking into the files I have lined out.
An Alternative solution that I would recommend is using 3rd Party Plugins like Advanced Custom Fields. Then you can add an file upload field to the Events Custom Post Type. Then you copy the appropriate template file from EM to your theme directory and edit it from there to show the field/file
If you’re using ACF Pro I believe they have a shortcode that you can used to display the content over the description part.
-
This reply was modified 7 years, 10 months ago by
Tim Vergara.
Hi,
Yeah I tried the Advanced custom field..The field appeared in the backend but wouldnt save the results.Also if I use ACF fields can we show that up on front end??I need to add a repeater ACF field where the user can click add on the field to enter additional information.
Thank youYes you could use ACF for it. However You would need to do some custom coding/modify the Template Files of EM and add the code to show the Fields that you need on Front End.
Here is a link on how to Customize the Template Files to your theme: https://wp-events-plugin.com/documentation/using-template-files/
You would need to find the appropriate template file depending on where in frontend you want to show it.
Hi,
I am using ACF pro to add a repeater field to the Event submission form.I am able to show the form on the front end.But its not getting saved.Can you help me figure out the files I need to modify? Can I copy the classes folder to my theme in case of modification?? I added the code to show the ACF field to forms/event-editor.php which is in my child theme.
Appreciate your help
Thank you
DionaHi,
I have a couple of issue..This is what I did
Added the beow code in my functions.phpadd_action( 'init', 'acf_head_add' ); function acf_head_add(){ acf_form_head(); }In my event-editor.php I added the following code where I need the ACF field to be present
<?php acf_form(array( 'post_id' => $post_id, 'field_groups' => array(1463), 'form' => false, 'return' => '', )); ?>The ACF field appears on the front end and I ma able to ad values.The issue is that the values I dded stays there when I create a new event.Also the values I added to the front end is not being saved at the backend.
Let me know where I can add a fresh new ACF field to appear when creating a new event
Also how to save the ACF fields in backend.Regards
Dionasorry but at the moment we are quite limited with regards to custom coding since acf is not yet integrated with EM
-
This reply was modified 7 years, 10 months ago by
The topic ‘File Upload’ is closed to new replies.