title: Passing hidden form inputs with Laravel Livewire
body: <p>I am running into an issue where I am using JavaScript to populate two hidden input fields as a user moves around a cropping tool on an image. The hidden inputs are being populated with the pixels where the image would be cropped. My initial understanding is that using wire.model won't work with hidden input fields that are updated by JavaScript as it will always return null when I submit the form.</p>
  <pre><code>&lt;input type=&quot;hidden&quot; id=&quot;formWidth&quot; name=&quot;width&quot; value=&quot;width&quot; wire:model.defer=&quot;width&quot;&gt;
  &lt;input type=&quot;hidden&quot; id=&quot;formHeight&quot; name=&quot;height&quot; value=&quot;height&quot; wire:model.defer=&quot;height&quot;&gt;
  </code></pre>
  <p>The value changes as a user moves the cropping tool around the image so once they are ready to submit it would look like:</p>
  <pre><code>&lt;input type=&quot;hidden&quot; id=&quot;formWidth&quot; name=&quot;width&quot; value=&quot;40px&quot; wire:model.defer=&quot;width&quot;&gt;
  &lt;input type=&quot;hidden&quot; id=&quot;formHeight&quot; name=&quot;height&quot; value=&quot;20px&quot; wire:model.defer=&quot;height&quot;&gt;
  </code></pre>
  <p>I am new to Livewire and I was hoping someone could push me in the direction of how I should be handling hidden inputs or if there is a way to have Livewire read a JavaScript variable and I would no longer update it in the input, but instead a new variable.</p>