title: Laravel Livewire, form submit: do something first then submit the form
body: <p>I have a livewire form which I intent to submit to an external url. However, before submitting, I want to programmatically add some hidden inputs which the user should not be able to edit then finally submit the form:</p>
  <pre><code> &lt;form action=&quot;some-external-url&quot; wire:submit.prevent=&quot;processForm&quot; method=&quot;post&quot;&gt;
                  &lt;x-inputs.text-input wire:model=&quot;amount&quot; name=&quot;amount&quot; /&gt;
                  &lt;x-inputs.button title=&quot;Submit&quot; /&gt;
              &lt;/form&gt;
  </code></pre>
  <p>Something similar to this jQuery code:</p>
  <pre><code>$('form').submit( function(ev){
           ev.preventDefault();
           //fetch and add some additional fields to the form
           // finally submit the form
           $(this).unbind('submit').submit()
  
    });
  </code></pre>
  <p>How best can I achieve this using livewire. Please note that I dont intent to use guzzle to submit this form.</p>