manojvarma
2 years ago

Using Input::get(); from the table

Posted 2 years ago by manojvarma

HI, i have a table in that i am getting the values from the database and showing. for every row i have a link . whenever the users click on the link, one more form will open. Now what i want is " i want to get the value from the table and show it in the form whenever users click on the link." my table code is

<thead>
                        <tr>
                          <th>Serial No</th>
                          <th>OP No</th>
                          <th>Device</th>
                          <th>State</th>
                          <th>Basic Test</th>
                        </tr>
                      </thead>
                      <tbody>
                        <tr>
                          @foreach($devices as $device)
                        <tr>
                        <td>{{ $device->slno}}</td>
                        <td>{{ $device->opno}}</td>
                        <td>{{ $device->name}}</td>
                        <td>@if($device->state == 0)
                                New 
                              @elseif ($device->state == 1)
                                Field-return
                              @endif </td>
                        <td>@if($device->name =='SAMRAT')
                        <a href="{{ url('samrattest') }}">Go</a>
                        @else($device->name == 'RAKSHAK')
                        <a href="{{ url('rakshaktest') }}">Go</a>
                        @endif
                        </td>
                        </tr>
                        @endforeach
                        </tr>

whenever the users click on the link the below form will open

 <form id="samrattesting" action="samrat-test-values" method="POST">
                          <div style="border: 3px solid; padding:15px;">
<label>serial number</label>
                          <div class="form-group">
    <input type="number" class="form-control" id="smt-fld-0-0" name="serial" >
  </div>
                          <label>MCU Software Version</label>
                          <div class="form-group">
    <input type="text" class="form-control" id="smt-fld-0-1" name="mcuversion" placeholder="Reference">
  </div>
  <label>Issue details</label>
                          <div class="form-group">
    <input type="textarea" class="form-control" id="smt-fld-0-2" name="issuedetails" placeholder="Reference">
  </div>
  <label>visual inspection problems</label>
                          <div class="form-group">
    <input type="textarea" class="form-control" id="smt-fld-0-3" name="visualinspection" placeholder="Reference">
  </div>
  </div>

so whenever the users click on link of any row. it has to get the serial number and show it in the form

Please sign in or create an account to participate in this conversation.