Ken481: Our event submission form is now customized by the instructions linked above. We were able to do all that we wanted to, with the minor exception that the “*” sign denoting a required field was always on a row of its own after the country dropdown.
We don’t currently have custom attributes or categories, but looking at the code in forms/event-editor.php it seems that if you want an immediate solution, you can hardcode which categories and attributes to display. With this option you have to mirror all changes in wp-admin to the file, which is a bit tedious but likely the best workaround until the feature to mark categories/tags/attributes as hidden from the public form makes it to the plugin settings GUI.
For categories I would go at it like this:
- Learn how to make a new walker (ruleset that the available categories are passed through). If this is not a documented feature, you have to figure it out from the code. The walker could be an exact copy of the default one but with a list of your intended hidden categories and an “if” statement that skips them when found.
- Use that walker instead of the default one on line 134 in forms/event-editor.php:
$walker = new EM_Walker_CategoryMultiselect();
Attributes don’t use a separate walker mechanism, so this should be enough:
- Create an array of the names of the attributes you want to keep hidden.
- Surround lines 155 to 159 (see below) with an “if” statement that skips the processing of attributes with names that match the array.
<?php if( is_array($EM_Event->event_attributes) && array_key_exists($name, $EM_Event->event_attributes) && $EM_Event->event_attributes[$name]==$attribute_val ): ?>
<option selected="selected"><?php echo $attribute_val; ?></option>
<?php else: ?>
<option><?php echo $attribute_val; ?></option>
<?php endif; ?>
We might be implementing something like this and could in that case give you the exact code, but that does not necessarily happen anytime soon.