Adding organizer to add new event

Home Forums Calendar Products Community Events Adding organizer to add new event

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #1113382
    indycourses
    Participant

    Hi,

    The use case for creating a community event requires that all the other organizers be hidden from the user on the ‘add new event’ form. I have streamlined things by creating a form that creates the organizer, and I have stored the organizer’s id as user_meta.

    I have gotten so far as displaying the ID/name of the organizer automatically on the ‘add an event’ form but wonder how to actually save the organizer to the event.

    Is there a function I can call/hook/filter to accomplish this?

    Thanks

    #1113600
    Brook
    Participant

    Howdy Roxanne!

    From what I understand you are trying to set things up so that when a user registers on your website using your form they create an organizer, and that organizer is saved. You already have this working, awesome! The problem is that when a user goes to submit an event using Community Events they see all of the other organizers available for selection, not just themselves.

    If I understand correct then this should be pretty easy. You say you already ID of the organizer showing on the Add Event page. That must mean you have create a theme override (Ala the Themer’s Guide ). If I were you I would use that override to hide the Organizer fields completely. You can do this by overriding: public_html/wp-content/plugins/the-events-calendar-community-events/src/views/community/edit-event.php and on line 64 remove the organizer module. Now replace it with a <input type=”hidden” /> and set the value of that hidden field to your organizer ID. Something like this should work:

    <input type="hidden" name="organizer[OrganizerID][]" value="{OUTPUT YOUR ORGANIZER ID HERE}">

    Assuming you have the actual organizer ID from WordPress (which is a number) then output that in the value attribute. This hidden field will replace the visible one, and when a user submits the form it will pass this fields data in place of the old visible one. Does that make sense? Does that work?

    Cheers!

    – Brook

    #1114414
    indycourses
    Participant

    Hi Brook,

    Thanks so much, that saved the day.

    Follow up question; since I am using gravity forms to create/update the instructor is there a similar way to save an email address to the ‘organizer[Email]’ field? That really seems to be the last piece of the puzzle.

    #1114504
    Brook
    Participant

    Howdy again,

    I am so happy that helped!

    since I am using gravity forms to create/update the instructor is there a similar way to save an email address to the ‘organizer[Email]’ field? That really seems to be the last piece of the puzzle.

    There definitely has to be a way. But I am not familiar enough with Gravity forms to know what the difficulty is. 🙁 If you can clarify on how you added the field and why the email is being especially difficult I might be able to help.

    • Brook
    #1114846
    indycourses
    Participant

    Hi Brook,

    Gravity Forms just has a standard email field, and I am not able to change the ‘name’ or ‘value’ attributes to tie it to the ‘Organizer Email’ meta field. I am using a plugin for Gravity Forms that creates the organizer post, I’m just having trouble figuring out how to save the email ass the ‘organizer email.’

    Thanks for all your help

    #1114866
    indycourses
    Participant

    A follow up this this last question. I did find the ‘edit an organizer’ page at this URL ‘courses/community/edit/organizer/5080/’

    Is there a front-end version of ‘create an organizer’ that I could use. That would bypass the need for gravity forms, and allow me to save the organizer email properly.

    Thanks again

    #1114981
    Brook
    Participant

    Hello again,

    We do not really have a submit an organizer page aside from the section included in the Add Events form.

    I think I understand now how you are submitting the Organizer. I am reasonably certain Gravity Forms allows you to submit “Post Meta” along with the primary title and description. Assuming it does, then you will need to set it up to submit with the “meta key”

    _OrganizerEmail

    Detailed info on our Meta keys can be found here.

    I wish i could be more specific but it’s been so long since I’ve used gravity form, I don’t even have a license anymore. You might ask them how to do this if you need detailed help. “Post meta” and “meta keys” are generic wordpress terms, so if you ask “how can I submit a value to a specific post meta key in my form?” they will be able to tell you. The key is _OrganizerEmail so just follow the steps for that key.

    Please let me know if there is anything else. Cheers!

    – Brook

    #1118310
    indycourses
    Participant

    Thank you, I sorted it all out.

    #1118468
    Brook
    Participant

    Excellent news! Thanks for getting back Roxanne.

    • Brook
Viewing 9 posts - 1 through 9 (of 9 total)
  • The topic ‘Adding organizer to add new event’ is closed to new replies.