|
@@ -230,11 +230,11 @@ JS;
|
|
|
return 'var checked = $(this).val();';
|
|
|
case Radio::class:
|
|
|
return <<<JS
|
|
|
-var checked = $('{$this->getElementClassSelector()}:checked').val();
|
|
|
+var checked = \$this.closest('.fields-group').find(':checked').val();
|
|
|
JS;
|
|
|
case Checkbox::class:
|
|
|
return <<<JS
|
|
|
-var checked = $('{$this->getElementClassSelector()}:checked').map(function(){
|
|
|
+var checked = \$this.closest('.fields-group').find(':checked').map(function(){
|
|
|
return $(this).val();
|
|
|
}).get();
|
|
|
JS;
|