{"id":1254886,"date":"2017-03-15T22:13:49","date_gmt":"2017-03-16T05:13:49","guid":{"rendered":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/required-venue-isnt-enforced\/"},"modified":"2017-04-05T21:16:18","modified_gmt":"2017-04-06T04:16:18","slug":"required-venue-isnt-enforced","status":"closed","type":"topic","link":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/required-venue-isnt-enforced\/","title":{"rendered":"Required Venue isn&#8217;t enforced"},"content":{"rendered":"<p>I want to require user to select a Venue before they can submit their event.<br \/>\nI followed the directions on https:\/\/theeventscalendar.com\/knowledgebase\/required-fields-for-events-submission-form\/<\/p>\n<p>Requiring URL works as expected &#8211; if I click submit without entering something, the form is not submitted and error message is displayed.<\/p>\n<p>But requiring venue&#8230;it says it is required, but I can submit the event without selecting a venue. Am I doing something wrong, or is this a bug?<\/p>\n<p><strong>Exact steps to reproduce:<\/strong><br \/>\nAdd the code below to child theme functions.php<br \/>\nOpen \/events\/community\/add<br \/>\nNotice that Venue now says it is required<br \/>\nEnter something for title &amp; description<br \/>\nClick Submit Event<\/p>\n<p><strong>Expected:<\/strong> Event not submitted and Venue section highlighted in red saying this is required.<br \/>\n<strong>Actual: <\/strong>Event is submitted without Venue<\/p>\n<p><strong>Here&#8217;s the code I used:<\/strong><br \/>\nfunction my_community_required_fields( $fields ) {<\/p>\n<p>if ( ! is_array( $fields ) ) {<br \/>\nreturn $fields;<br \/>\n}<\/p>\n<p>$fields[] = &#8216;venue&#8217;;<\/p>\n<p>return $fields;<br \/>\n}<\/p>\n<p>add_filter( &#8216;tribe_events_community_required_fields&#8217;, &#8216;my_community_required_fields&#8217;, 10, 1 );<\/p>\n","protected":false},"template":"","class_list":["post-1254886","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>Required Venue isn&#039;t enforced -<\/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\/required-venue-isnt-enforced\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Required Venue isn&#039;t enforced -\" \/>\n<meta property=\"og:description\" content=\"I want to require user to select a Venue before they can submit their event. I followed the directions on https:\/\/theeventscalendar.com\/knowledgebase\/required-fields-for-events-submission-form\/ Requiring URL works as expected &#8211; if I click submit without entering something, the form is not submitted and error message is displayed. But requiring venue&#8230;it says it is required, but I can submit [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/required-venue-isnt-enforced\/\" \/>\n<meta property=\"article:modified_time\" content=\"2017-04-06T04:16:18+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\/required-venue-isnt-enforced\/\",\"url\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/required-venue-isnt-enforced\/\",\"name\":\"Required Venue isn't enforced -\",\"isPartOf\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\"},\"datePublished\":\"2017-03-16T05:13:49+00:00\",\"dateModified\":\"2017-04-06T04:16:18+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/required-venue-isnt-enforced\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/required-venue-isnt-enforced\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/required-venue-isnt-enforced\/#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\":\"Required Venue isn&#8217;t enforced\"}]},{\"@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":"Required Venue isn't enforced -","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\/required-venue-isnt-enforced\/","og_locale":"en_US","og_type":"article","og_title":"Required Venue isn't enforced -","og_description":"I want to require user to select a Venue before they can submit their event. I followed the directions on https:\/\/theeventscalendar.com\/knowledgebase\/required-fields-for-events-submission-form\/ Requiring URL works as expected &#8211; if I click submit without entering something, the form is not submitted and error message is displayed. But requiring venue&#8230;it says it is required, but I can submit [&hellip;]","og_url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/required-venue-isnt-enforced\/","article_modified_time":"2017-04-06T04:16:18+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\/required-venue-isnt-enforced\/","url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/required-venue-isnt-enforced\/","name":"Required Venue isn't enforced -","isPartOf":{"@id":"https:\/\/theeventscalendar.com\/support\/#website"},"datePublished":"2017-03-16T05:13:49+00:00","dateModified":"2017-04-06T04:16:18+00:00","breadcrumb":{"@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/required-venue-isnt-enforced\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/theeventscalendar.com\/support\/forums\/topic\/required-venue-isnt-enforced\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/required-venue-isnt-enforced\/#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":"Required Venue isn&#8217;t enforced"}]},{"@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\/1254886","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":1,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1254886\/revisions"}],"predecessor-version":[{"id":1265594,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1254886\/revisions\/1265594"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/media?parent=1254886"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}