Changeset 2672151
- Timestamp:
- 02/03/2022 12:01:57 PM (4 years ago)
- Location:
- events-made-easy/trunk
- Files:
-
- 2 edited
-
eme_formfields.php (modified) (4 diffs)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
events-made-easy/trunk/eme_formfields.php
r2671376 r2672151 73 73 if (isset($_POST['field_purpose'])) 74 74 $formfield['field_purpose'] = trim(eme_sanitize_request($_POST['field_purpose'])); 75 $formfield['field_condition'] = trim(eme_sanitize_request($_POST['field_condition']));75 $formfield['field_condition'] = join(',',eme_sanitize_request($_POST['field_condition'])); 76 76 if (eme_is_multifield($formfield['field_type']) && empty($formfield['field_values'])) { 77 77 $message = __('Error: the field value can not be empty for this type of field.','events-made-easy'); … … 282 282 } 283 283 284 $field_condition_arr=explode(',',$formfield['field_condition']); 284 285 $layout .= " 285 286 </tr> … … 292 293 <tr id='tr_field_condition' class='form-field'> 293 294 <th scope='row' style='vertical-align:top'><label for='field_condition'>".__('Field condition', 'events-made-easy')."</label></th> 294 <td>".eme_ui_ select($formfield['field_condition'],"field_condition",$peoplefieldconditions)."295 <td>".eme_ui_multiselect($field_condition_arr,"field_condition",$peoplefieldconditions,5,'',0," eme_select2_width50_class")." 295 296 <br />".__('Only show this field if the person is member of the selected group. Leave empty to add this field to all people.','events-made-easy')." 296 297 </td> … … 1565 1566 global $wpdb; 1566 1567 $formfields_table = $wpdb->prefix.FORMFIELDS_TBNAME; 1567 $sql = $wpdb->prepare("SELECT * FROM $formfields_table where field_purpose='people' AND field_condition=%s",$condition);1568 $sql = $wpdb->prepare("SELECT * FROM $formfields_table where field_purpose='people' AND FIND_IN_SET(%s,field_condition)",$condition); 1568 1569 return $wpdb->get_results($sql,ARRAY_A); 1569 1570 } -
events-made-easy/trunk/readme.txt
r2671663 r2672151 83 83 84 84 == Changelog == 85 = 2.2.54 (2022//) = 86 * A custom field of type "People" can now be in more group than one as a field condition, meaning the field will then appear for all people in one of the selected groups when editing a person 87 85 88 = 2.2.54 (2022/02/02) = 86 89 * Add order param for multibooking form shortcodes (only has effect when using together with scope or category_id options)
Note: See TracChangeset
for help on using the changeset viewer.