Skip to content

Commit

Permalink
Fix conditional field issue with other languages
Browse files Browse the repository at this point in the history
  • Loading branch information
girishpanchal30 committed Sep 6, 2024
1 parent d144079 commit eca4d42
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion inc/hooks.php
Original file line number Diff line number Diff line change
Expand Up @@ -705,7 +705,7 @@ function ppom_hooks_input_main_wrapper_class( $wrapper_class, $classes_array, $f

foreach ( $conditions['rules'] as $index => $rule ) {

$element = isset( $rule['elements'] ) ? $rule['elements'] : '';
$element = isset( $rule['elements'] ) ? strtolower( $rule['elements'] ): '';
$wrapper_class .= " ppom-cond-{$element}";
$wrapper_class .= " ppom-locked-{$element}";
}
Expand Down
2 changes: 1 addition & 1 deletion js/ppom-conditions-v2.js
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ function ppom_check_conditions(data_name, callback) {
let cond_elements = [];
for (var t = 1; t <= total_cond; t++) {

const cond_element = jQuery(this).data(`cond-input${t}`);
const cond_element = jQuery(this).data(`cond-input${t}`)?.toString()?.toLowerCase();
const cond_val = jQuery(this).data(`cond-val${t}`).toString();
const operator = jQuery(this).data(`cond-operator${t}`);
const field_val = ppom_get_element_value(cond_element);
Expand Down

0 comments on commit eca4d42

Please sign in to comment.