title: Multiple Forms / Child & Parent Forms in one page with Laravel Livewire
body: <p>I have two forms one is uploading the images and saving them to the database, After saving its return Images ids.
  The second form is my main form and I want to use that image's id in the parent form as an input file.</p>
  <p>Here is the main page HTML (Parent Form):-</p>
  <pre><code>&lt;div class=&quot;container mt-5&quot;&gt;
  &lt;div class=&quot;row&quot;&gt;
      &lt;h1 class=&quot;text-center my-2&quot;&gt;Laravel Examples&lt;/h1&gt;
  
      @livewire('multiple-image-upload', ['action' =&gt; 'add'])
  
      &lt;form action=&quot;#&quot; method=&quot;get&quot;&gt;
  
          &lt;input type=&quot;text&quot; name=&quot;first_name&quot; {{old('first_name')}}&gt;
          &lt;input type=&quot;text&quot; name=&quot;last_name&quot; {{old('last_name')}}&gt;
  
          @if(!empty($uploadedImageIds))
              &lt;input type=&quot;hidden&quot;  value=&quot;{{$uploadedImageIds}}&quot;&gt;
          @endif
  
          &lt;input type=&quot;submit&quot;  name=&quot;submit_add_category&quot;&gt;
  
      &lt;/form&gt;
  
  &lt;/div&gt;
  </code></pre>
  
  <p>and here is blade file of livewire-view which uploadeds the images</p>
  
  <pre><code>&lt;form wire:submit.prevent=&quot;uploadFiles&quot; enctype=&quot;multipart/form-data&quot;&gt;
  
      &lt;input type=&quot;file&quot; wire:model=&quot;images&quot; multiple accept=&quot;image/*&quot; &gt;
  
      &lt;div wire:loading wire:target=&quot;images&quot;&gt;Uploading the images...&lt;/div&gt;
  
      @if( !empty( $images ) )
  
          &lt;p&gt;Preview your images before uploading&lt;/p&gt;
  
          @foreach ( $images as $image )
  
              &lt;img src=&quot;{{ $image-&gt;temporaryUrl() }}&quot; alt=&quot;&quot; style=&quot;width: 200px;&quot; &gt;
  
              @error('images.'.$loop-&gt;index)
                      &lt;span style=&quot;color: red;&quot; &gt;{{ $message }}&lt;/span&gt;
              @enderror
  
              &lt;p&gt;{{$image-&gt;getClientOriginalExtension()}}&lt;/p&gt;
              &lt;p&gt;{{$image-&gt;getClientOriginalName()}}&lt;/p&gt;
              &lt;p&gt;{{\App\Helpers\Helper::getFileSize($image-&gt;getSize())}}&lt;/p&gt;
              &lt;p wire:key=&quot;{{$loop-&gt;index}}&quot; wire:click=&quot;removeImage({{$loop-&gt;index}})&quot;&gt;Remove&lt;/p&gt;
  
          @endforeach
  
          &lt;button type=&quot;submit&quot; &gt;Upload Images&lt;/button&gt;
      @endif
  
  &lt;/form&gt;
  
  @if(!empty($uploadImages))
      &lt;p&gt;Preview your images after uploading&lt;/p&gt;
      &lt;input type=&quot;hidden&quot; value=&quot;{{$uploadedImageIds}}&quot;&gt;
      @foreach($uploadImages as $uploadImage)
          &lt;img src=&quot;{{ $uploadImage['link'] }}&quot; alt=&quot;&quot; style=&quot;width: 500px;&quot; &gt;
          &lt;p wire:click=&quot;deleteImage(11)&quot;&gt;Remove&lt;/p&gt;
      @endforeach
  @endif
  </code></pre>
  
  <p>Any solution in which I can share the uploaded images in the main form?</p>
  <p>Thanks in advance</p>