• @joneiseman With EMP v3.2.8.1/EM 6.4.6.4 under Automations, when you select ‘Event Categories’ and then ‘save’ the Categories do not remain within the Form Field. It’s the same for ‘Event Tags’.

    I inspected the element and this looks like it might be the issue:

    <input type="text" autocomplete="new-password" autofill="no" tabindex="" id="em-automation-event-categories-selectized" placeholder="Event Categories" style="width: 111.242px; opacity: 1; position: relative; left: 0px;">

    Wouldn’t the ‘autocomplete’ and the ‘autofill’ set the way they are not allow the form field to remain filled???

    I’ve tested this on a default theme with all other plugins disabled and on both Chrome and Safari and it makes no difference. Any ideas???

Viewing 4 replies - 1 through 4 (of 4 total)
  • I haven’t tried Automations so I don’t know the answer to your question. In the input tag it sets the placeholder value to “Event Categories” rather than the current value for the Categories for this event.

    Thread Starter misticjeff

    (@misticjeff)

    Well… it’s broken in any case. I’ll keep workin on it.

    Thread Starter misticjeff

    (@misticjeff)

    @joneiseman I think I found part of the code used but not sure where to go with it.

    <div class="trigger-context trigger-context-event">
    							<div class="em-automation-context-multi em-automation-event-categories">
    								<?php
    								$what = isset($trigger->trigger_data['filters']['categories_include']) ? $trigger->trigger_data['filters']['categories_include'] :'include';
    								?>
    								<p>
    									<label>
    									<select name="trigger_output[events][categories_include]" class="em-automation-event-categories-include">
    										<option value="include" <?php if( $what === 'include' ) echo 'selected'; ?>><?php esc_html_e('Include', 'em-pro'); ?></option>
    										<option value="exclude"<?php if( $what === 'exclude' ) echo 'selected'; ?>><?php esc_html_e('Exclude', 'em-pro'); ?></option>
    									</select>
    									<strong><?php esc_html_e('the following categories:', 'em-pro'); ?></strong>
    									</label>
    								</p>
    								<p>
    									<label for="em-automation-event-categories" class="screen-reader-text"><?php esc_html_e_emp('Event Categories'); ?></label>
    									<select name="trigger_output[events][categories][]" class="em-selectize checkboxes" id="em-automation-event-categories" multiple size="10" placeholder="<?php esc_html_e_emp('Event Categories'); ?>">
    										<?php
    										$args_em = apply_filters('em_automation_categories_args', array('orderby'=>'name','hide_empty'=>0));
    										$categories = \EM_Categories::get($args_em);
    										$selected = !empty($trigger->trigger_data['filters']['categories']) ? $trigger->trigger_data['filters']['categories'] : array();
    										if( !empty($args['category']) ){
    											if( !is_array($args['category']) ){
    												$selected = explode(',', $args['category']);
    											} else {
    												$selected = $args['category'];
    											}
    										}
    										$walker = new \EM_Walker_CategoryMultiselect();
    										$args_em = apply_filters('em_automation_categories_walker_args', array('hide_empty' => 0, 'orderby' => 'name', 'name' => 'category', 'hierarchical' => true, 'taxonomy' => EM_TAXONOMY_CATEGORY, 'selected' => $selected, 'show_option_none' => esc_html__emp('Event Categories'), 'option_none_value' => 0, 'walker' => $walker,));
    										echo walk_category_dropdown_tree($categories, 0, $args_em);
    										?>
    									</select>
    								</p>
    							</div>

    Looks like this is something in Events Manager Pro. I suggest you ask this question in the Pro Support Forums. I don’t have Events Manager Pro so I can’t help you with this.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Automation – Not Holding Selected Categories’ is closed to new replies.