{"id":107205,"date":"2014-02-20T13:54:46","date_gmt":"2014-02-20T21:54:46","guid":{"rendered":"https:\/\/tri.be\/support\/forums\/topic\/change-required-fields-on-community-event-submission-page\/"},"modified":"2014-03-10T06:58:25","modified_gmt":"2014-03-10T13:58:25","slug":"change-required-fields-on-community-event-submission-page","status":"closed","type":"topic","link":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/change-required-fields-on-community-event-submission-page\/","title":{"rendered":"Change Required Fields on Community Event Submission Page"},"content":{"rendered":"<p>We want to require our contributors to either:<br \/>\n&#8211; select a Saved Organizer, or<br \/>\n&#8211; complete the Organizer Name, Phone and Email fields.<\/p>\n<p>On Jan. 13 you posted some code (http:\/\/bit.ly\/1bPvdzc) that should enable us to require certain fields, but that won\u2019t give us the either\/or functionality. And staying with that code for a moment, we haven\u2019t been able to get it to work. Here\u2019s what we inserted in the functions.php file:<\/p>\n<p>\/*&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;*\/<br \/>\n\/* Add Required Fields to Community Events submission form in Events Calendar<br \/>\n\/*&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;*\/<br \/>\nadd_filter(&#8216;tribe_events_community_required_fields&#8217;, &#8216;add_required_fields&#8217;);<br \/>\nfunction add_required_fields() {<br \/>\n  return array(<br \/>\n    &#8216;post_content&#8217;,<br \/>\n    &#8216;post_title&#8217;,<br \/>\n    &#8216;organizer[Organizer]&#8217;,<br \/>\n    &#8216;organizer[Email]&#8217;<br \/>\n  );<br \/>\n}<\/p>\n<p>\/*&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;*\/<br \/>\n\/* Add Error Message (required fields) to Community Events submissions in Events Calendar<br \/>\n\/*&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;*\/<br \/>\nadd_filter(&#8216;tribe_events_community_submission_error_message&#8217;, &#8216;custom_error_message&#8217;);<br \/>\nfunction custom_error_message() {<br \/>\n        return &#8216;&lt;p&gt;There was a problem saving your event. Please check to be sure you have filled in the following fields: &lt;\/p&gt;<\/p>\n<ul>\n<li>Title<\/li>\n<li>Description<\/li>\n<li>Organizer Name<\/li>\n<li>Organizer Email<\/li>\n<\/ul>\n<p>&#8216;;<br \/>\n}<\/p>\n<p>This returns the error message. Unfortunately, it returns the error message even when we do complete the Organizer Name and Email fields. Alas. Maybe you can spot what we\u2019ve got wrong.<\/p>\n<p>Our theme is Pagelines, btw, but the same thing happens in Twenty Thirteen.<\/p>\n<p>I\u2019m afraid I\u2019ve gone on too long, so, in brief, we want to always have Organizer Name and Email associated with an event. And (new request!), we\u2019d like to have that information transmitted in the Email notification.<\/p>\n<p>Suggestions?<\/p>\n","protected":false},"template":"","class_list":["post-107205","topic","type-topic","status-closed","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Change Required Fields on Community Event Submission Page -<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/change-required-fields-on-community-event-submission-page\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Change Required Fields on Community Event Submission Page -\" \/>\n<meta property=\"og:description\" content=\"We want to require our contributors to either: &#8211; select a Saved Organizer, or &#8211; complete the Organizer Name, Phone and Email fields. On Jan. 13 you posted some code (http:\/\/bit.ly\/1bPvdzc) that should enable us to require certain fields, but that won\u2019t give us the either\/or functionality. And staying with that code for a moment, [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/change-required-fields-on-community-event-submission-page\/\" \/>\n<meta property=\"article:modified_time\" content=\"2014-03-10T13:58:25+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/change-required-fields-on-community-event-submission-page\/\",\"url\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/change-required-fields-on-community-event-submission-page\/\",\"name\":\"Change Required Fields on Community Event Submission Page -\",\"isPartOf\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\"},\"datePublished\":\"2014-02-20T21:54:46+00:00\",\"dateModified\":\"2014-03-10T13:58:25+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/change-required-fields-on-community-event-submission-page\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/change-required-fields-on-community-event-submission-page\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/change-required-fields-on-community-event-submission-page\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/theeventscalendar.com\/support\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Topics\",\"item\":\"https:\/\/theeventscalendar.com\/support\/topics\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Calendar Products\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Community Events\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/community-events\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"Change Required Fields on Community Event Submission Page\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\",\"url\":\"https:\/\/theeventscalendar.com\/support\/\",\"name\":\"\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/theeventscalendar.com\/support\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Change Required Fields on Community Event Submission Page -","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/change-required-fields-on-community-event-submission-page\/","og_locale":"en_US","og_type":"article","og_title":"Change Required Fields on Community Event Submission Page -","og_description":"We want to require our contributors to either: &#8211; select a Saved Organizer, or &#8211; complete the Organizer Name, Phone and Email fields. On Jan. 13 you posted some code (http:\/\/bit.ly\/1bPvdzc) that should enable us to require certain fields, but that won\u2019t give us the either\/or functionality. And staying with that code for a moment, [&hellip;]","og_url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/change-required-fields-on-community-event-submission-page\/","article_modified_time":"2014-03-10T13:58:25+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/change-required-fields-on-community-event-submission-page\/","url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/change-required-fields-on-community-event-submission-page\/","name":"Change Required Fields on Community Event Submission Page -","isPartOf":{"@id":"https:\/\/theeventscalendar.com\/support\/#website"},"datePublished":"2014-02-20T21:54:46+00:00","dateModified":"2014-03-10T13:58:25+00:00","breadcrumb":{"@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/change-required-fields-on-community-event-submission-page\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/theeventscalendar.com\/support\/forums\/topic\/change-required-fields-on-community-event-submission-page\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/change-required-fields-on-community-event-submission-page\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/theeventscalendar.com\/support\/"},{"@type":"ListItem","position":2,"name":"Topics","item":"https:\/\/theeventscalendar.com\/support\/topics\/"},{"@type":"ListItem","position":3,"name":"Calendar Products","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/"},{"@type":"ListItem","position":4,"name":"Community Events","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/community-events\/"},{"@type":"ListItem","position":5,"name":"Change Required Fields on Community Event Submission Page"}]},{"@type":"WebSite","@id":"https:\/\/theeventscalendar.com\/support\/#website","url":"https:\/\/theeventscalendar.com\/support\/","name":"","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/theeventscalendar.com\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/107205","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/107205\/revisions"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/media?parent=107205"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}