[BUGFIX] Condition applies to more than one field
authorAlex Kellner <alexander.kellner@in2code.de>
Wed, 4 Nov 2015 15:35:35 +0000 (16:35 +0100)
committerAlex Kellner <alexander.kellner@in2code.de>
Wed, 4 Nov 2015 15:35:35 +0000 (16:35 +0100)
Sharpen field selection with jQuery

Related: #71325

Resources/Public/JavaScript/PowermailCondition.js

index b2bdb3c..5142add 100644 (file)
@@ -96,7 +96,7 @@ function PowermailCondition($, $formElement) {
 
                                        // do actions with single fields
                                        for (var fieldMarker in data.todo[formUid][pageUid]) {
-                                               var $field = $form.find('[id^=powermail_field_' + fieldMarker + ']');
+                                               var $field = $form.find('[id=powermail_field_' + fieldMarker + ']');
                                                if (data.todo[formUid][pageUid][fieldMarker]['#action'] === 'hide') {
                                                        that.hideField($field);
                                                }