title: Yii2 - onsubmit event is fired twice
body: <p>I am trying to make submit event properly (onsubmit is set inline), but it will be fired twice, which is not desired behavior. </p>
  
  <p>My <strong>ActiveForm</strong> code:</p>
  
  <pre><code>&lt;?php
  
  use app\models\Countries;
  use app\models\States;
  use yii\bootstrap\ActiveForm;
  use yii\helpers\ArrayHelper;
  use yii\helpers\Html;
  
  $form = ActiveForm::begin(
      [
          'action'  =&gt; 'user-default-shipping/create',
          'options' =&gt; [
              'onsubmit' =&gt; 'Address.createDefault(event, this)'
          ]
  
      ]
  );
  
  if ($model-&gt;id)
      echo Html::activeHiddenInput($model, 'id');
  
  echo $form-&gt;field($model, 'city')-&gt;textInput();
  
  echo $form-&gt;field($model, 'address')-&gt;textInput();
  
  echo $form-&gt;field($model, 'zip')-&gt;input('text');
  
  echo $form-&gt;field($model, 'country_id')
      -&gt;dropDownList(ArrayHelper::map(Countries::find()-&gt;all(), 'country_id', 'country_name'),
          ['role' =&gt; 'countries']
      )-&gt;hint('Choose your country.');
  
  echo $form-&gt;field($model, 'state_id')
      -&gt;dropDownList(ArrayHelper::map(States::find()-&gt;all(), 'state_id', 'state_name'),
          [
              'role' =&gt; 'states'
          ]
      )-&gt;hint('Choose your state.');
  
  ?&gt;
  
      &lt;div class="form-group"&gt;
          &lt;button type="submit" class="btn btn-green"&gt;Submit&lt;/button&gt;
      &lt;/div&gt;
  
  &lt;?php ActiveForm::end(); ?&gt;
  </code></pre>
  
  <p>JS code:</p>
  
  <pre><code>const Address = {
  
      createDefault(event, form) {
          event.preventDefault();
  
          console.log(form);
  
      }
  
  }
  </code></pre>
  
  <p>Is there a way to prevent this behavior?</p>