Edit add new event form in community events

Home Forums Calendar Products Community Events Edit add new event form in community events

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #27107
    Andrew
    Participant

    Can you tell me how i edit this form please?
    Also, is it possible to force that an event is submitted in a certain category?

    #27119

    I have this question as well and it’s quite urgent. Thank you for any help.

    #27120
    Andrew
    Participant

    Urgent here too. It is not in the community events files that I have copied over from the plugin into my mytheme/events directory.

    Well it is, but most of the form is not editable there as it calls in other information from elsewhere.

    #27123
    Barry
    Member

    I see what you are saying Andrew – but there is nothing to stop you from replacing those bits of code that call in information from elsewhere … of course you’d need to have a good understanding of what is happening behind the scenes if you were to replace them with your own code.

    Can you give an example of what you are trying to do?

    #27124
    Andrew
    Participant

    That’s my point, I thought there’d be some documentation, for example the names of all of the fields that are pulled up, so that I could pull them individually. Does this not exist?

    #27125
    Barry
    Member

    (As a footnote, I’ve moved this across to the Community Events forum since it relates to that plugin.)

    #27126
    Barry
    Member

    Can you give an example of the fields you would like to pull individually?

    #27128
    Andrew
    Participant

    A. We may need to remove some fields
    B. We may need to add custom fields.
    C. What if we want to create a custom event entry form? It would be good to have the field names to use.

    #27130

    Hi Barry,

    we are wanting to have events in which we can:

    1. pre-fill Title
    2. pre-fill or delete Description
    3. pre-set Category
    4. pre-fill Cost

    As I mentioned in another post, the event is one type (like a house party) that people sign up to host from wherever they are. only the dates and location are relevant for them to change and because we want people to search the events in Eventbrite to allow RSVP/Registration, there needs to be consistency in Title so a simple search query for EB works, e.g.:
    http://www.eventbrite.com/directory/?q=Mindfulvotes&loc=Worldwide

    gets people to this event on EB:
    http://www.eventbrite.com/event/4637665382

    which corresponds to this on WP/Event Calendar:
    http://mindfulvotes.org/event/mindfulvotes-circle-berkeley

    #27140
    Barry
    Member

    @angel – thanks for breaking your question out into a separate thread, that will make it easier to manage as otherwise the scope of your combined questions is pretty huge.

    We admittedly don’t have much in-depth documentation on this stuff, but often this level of customization is the preserve of experienced devs who might find it superfluous in any case. That said, I’ll make a note of your interest in more documentation covering this particular arena and if possible and we feel there is enough demand to warrant it then I guess we may look at putting it in place 🙂

    Most if not all of what you want is possible – again I can’t realistically cover it all here, but let’s take a straightforward example to show how this kind of thing might be tackled.

    Thinking about deleting the description field (both of you mentioned the need to delete a field) perhaps we could look at that as an example of how you might go about this kind of customization. It’s particularly interesting since it is a required field.

    The first thing I would do is look in the Community Events documentation which links to a new user primer – this contains information on Community Events related template overrides.

    Armed with this information we see that it is possible to override event-form.php. Looking inside this file, around lines 43-48 we can see the code that generates the description field. Let’s go ahead and remove it.

    Now this is where some knowledge of WordPress and its API comes in (in other words, some of what I’m covering here is not specific to The Events Calendar or Community Events): when a post is inserted programmatically it normally must contain some content (the description) or else an error is thrown.

    Happily this can be overridden and the error suppressed, simply by the appropriate use of filters and hooks and some timely manipulation of posted form data. Here’s just such an example of some code that you might place in your theme’s functions.php file to achieve this:

    http://pastebin.com/9TDM55KN

    In summary, pretty much everything you want to do is a real possibility but at least for the time being you will need a good knowledge of PHP and WordPress plus the time to spend researching how The Events Calendar and Community Events work. Once again I will make a note of your interest in further learning resources here.

    You may also be interested in the concepts presented in this tutorial:

    http://creativeslice.com/tutorials/gravity-forms-events-calendar-submissions/

    That relates specifically to integration with Gravity Forms (and may be a tad out of date), but at a high level there are some conceptual nuggets of gold in there that might be of value to you.

    #27167

    Thanks, Barry..
    I’m going to try to plow through this and see if I can make it work. Is there a way to default the category? Seems this would be useful especially in instances in which you want to keep community submissions distinct from your own events.

    #27178
    Barry
    Member

    Again totally possible but it’s sufficiently detailed work to be something I can’t really offer support for, beyond highlighting a few possible avenues:

    • Swapping out the call to TribeCommunityEvents::formCategoryDropdown() contained in the event-form.php template with your own custom logic
    • You could “cheat” and use a little Javascript magic to check a default category (and even to hide it, such that all submitted categories are implicitly placed in a “Community” category in addition to any others that might be selected)
    • Very likely you could enforce a policy where all community events are taxonomized in a certain way by using an appropriate filter or action to hook the event form submission

    There are definitely routes to let you achieve what you want here, however it’s beyond the level of support we can offer to go into any more depth with this.

Viewing 12 posts - 1 through 12 (of 12 total)
  • The topic ‘Edit add new event form in community events’ is closed to new replies.