Additional Fields – How to submit and be private?

Home Forums Calendar Products Community Events Additional Fields – How to submit and be private?

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #59935
    Jamie Oastler
    Participant

    Two questions that have a bit of context explanation in this support request to community events addon (https://theeventscalendar.com/support/forums/topic/alternatives-to-add-event/) that both are based on the Pro additional fields feature.

    1) How to have additional fields be “private”?
    Some additional fields should only be viewable / editable by admin resources. However the community events edit view provides a complete list of all the additional fields. How can certain additional fields be marked proviate?

    2) How to submit additional fields via Gravity Form or other process?
    From what I can tell the additional fields are custom fields with meta key like _ecp_custom_1. I’ve got this code snippet applied – http://creativeslice.com/tutorials/gravity-forms-events-calendar-submissions/ – which has organizer, venue and date info being properly captured. But having some difficulty writing into specific additional fields that I have created using a gravity form.

    #59945
    Barry
    Member

    Hi Jamie – I’m going to move this across to our Community Events forum so you can get help from our expert 🙂

    #60006
    Casey
    Participant

    Jamie,
    Thanks for reaching out. Unfortunately, #1 is not currently supported with the Community add-on. If you’re adept at PHP/WordPress, you might be able to develop something yourself. If not, feel free to submit it is a feature request on our User Voice page here: https://tribe.uservoice.com

    Regarding #2, you’d have to reach out to the Gravity Forms support team for their help with this.

    I’m sorry I’m not able to help much more than that, but please let me know if you have further questions. Thanks!

    #60009
    Jamie Oastler
    Participant

    Hi Casey,

    I figured that would be the case for #1 and will follow-up with submission towards that.

    For #2 – the issue isn’t specific to GF it’s a general WP development one. How would I add / update one of the additional field values?

    If it were a standard post / custom field I would expect to be able to use the WP function add_post_meta with the meta key above.

    #60013
    Casey
    Participant

    Sorry Jamie. I guess I misunderstood your question on #2. Yes, you can update those fields using update_post_meta like this:


    update_post_meta(131, '_ecp_custom_1', 'Success!');

    You’ll have to know the ID of the Event Post you just created, along with the ID of the custom field you’ve added, which you can find by viewing the ‘name’ attribute of the input field.

    Does that help?

    #60037
    Jamie Oastler
    Participant

    For anyone else trying to solve the first challenge – having hidden additional fields for Community Events – the following JS is all you need along with the ID of the field:

    ‘jQuery(‘#event-meta.eventtable input[name=”_ecp_custom_1″]’).parents(‘tr’).eq(0).hide();’

    At least if being hidden visually is all you need.

    #60038
    Casey
    Participant

    Great tip! Yeah, you can always use some jQuery to customize the form if needed. We just don’t have an easy way from the Admin to control which fields are hidden and which aren’t.

    Did my previous post get you where you need to be? Just let me know and I’ll mark this as answered and close it out. Thanks!

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Additional Fields – How to submit and be private?’ is closed to new replies.