Home › Forums › Calendar Products › Community Events › Additional Fields – How to submit and be private?
- This topic has 6 replies, 3 voices, and was last updated 10 years, 7 months ago by Casey.
-
AuthorPosts
-
August 12, 2013 at 6:22 am #59935Jamie OastlerParticipant
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.August 12, 2013 at 6:56 am #59945BarryMemberHi Jamie – I’m going to move this across to our Community Events forum so you can get help from our expert 🙂
August 12, 2013 at 12:16 pm #60006CaseyParticipantJamie,
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.comRegarding #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!
August 12, 2013 at 12:31 pm #60009Jamie OastlerParticipantHi 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.
August 12, 2013 at 12:42 pm #60013CaseyParticipantSorry 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?
August 12, 2013 at 1:17 pm #60037Jamie OastlerParticipantFor 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.
August 12, 2013 at 1:19 pm #60038CaseyParticipantGreat 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!
-
AuthorPosts
- The topic ‘Additional Fields – How to submit and be private?’ is closed to new replies.