Actually, it would be really helpful to remove those in the back end as well (when entering the event) since they are required fields and I have nothing to put in them. Thanks!
I tried editing this section at the beginning of ajax-event-calendar.php, but it didn’t affect either the front end or back end of the event details.
private $required_fields = array();
// 0: hide | 1:show | 2:require
private $plugin_default_options = array(
'menu' => '1',
'limit' => '1',
'title' => '1',
'venue' => '1',
'address' => '0',
'city' => '0',
'state' => '0',
'zip' => '0',
'link' => '0',
'description' => '0',
'contact' => '0',
'contact_info' => '0',
'accessible' => '0',
'rsvp' => '0',
'reset' => '0'
);
corpcasting,
Look in settings for the calendar submenu, this plugin allows you to toggle which form fields are required. Also, if all of the address fields are empty, the view map link does not appear.
Eran
Wow. Thanks for the tip. Can’t believe I missed those settings.
So there would be no way to enter in a Venue only and still have the “View Map” link to not appear?
corpcasting,
Venue is not considered an address field – so the “view map” link should not appear, if it alone is populated. I know for a fact that’s how it works in the soon to be released version of the plugin, although there may be a bug in the 0.9.7.1 release where that would not be a true statement.
Eran
Thanks for the reply Eran. Yes, there must be a bug, because adding a Venue does cause the “View Map” button to appear. I look forward to the update.
Thanks!
The “View Map” button is still appearing in v0.9.8.1 after entering in only a venue.
Yes, I see the logic in the code.
I will be updating this in the patch release, if you’d like to fix it in the meantime, change the following line of code in show-event.php:
FROM
// google map link
if ($options['show_map_link']) {
TO
// google map link
if ($options['show_map_link'] && (!empty($event->address) || !empty($event->city) || !empty($event->state) || !empty($event->zip))) {