title: Uncaught ReferenceError: $event is not defined
body: <p>I'm getting the following error. What is wrong?</p>
  <pre><code>Uncaught ReferenceError: $event is not defined
  </code></pre>
  <p>Code:</p>
  <pre><code>&lt;form wire:submit.prevent=&quot;submit(Object.fromEntries(new FormData($event.target)))&quot; wire:ref=&quot;send-message&quot;&gt;
     &lt;input type=&quot;text&quot; name=&quot;message&quot; wire:loading.attr=&quot;disabled&quot; wire:target=&quot;send-message&quot;&gt;
     &lt;button&gt;Send&lt;/button&gt;
  &lt;/form&gt;
  </code></pre>
  <p>This is inside a <code>&lt;x-livewire-modal&gt;</code> component if that matters.</p>