1

I have a form that rendering as blank in HTML (for no reason that I can see), but the values are still being sent through to Laravel. This wouldn't bother me except I need to be able to change the button text and have a way to copy the from, neither of which will work because the form is technically empty. Below is a screenshot of what the form is outputting.

enter image description here

The code looks like this:

@foreach( $Contractors as $contractor )

{!! Form::open(array('route' => 'ContractorInvoicing.store', 'class' => 'form-inline InvoiceForm')); !!}

<tr {!! checkRDO($contractor->RDOCat, $TheDate) !!}>
    <td>{!! $contractor->Surname; !!}, {!! $contractor->name; !!} </td>
<td>{!! $contractor->PRN; !!} {!! Form::hidden('PRN', $contractor->PRN); !!} {!! Form::hidden('thedate', $TheDate); !!} {!! Form::hidden('id', ''); !!}</td>
<td>{!! Form::text('StartTime', '', array('class' => 'form-control StartTime required', 'id' => 'TimePicker', 'tabindex' => '1')); !!}</td>
<td>{!! Form::text('FinishTime', '', array('class' => 'form-control FinishTime required', 'tabindex' => '2')); !!}</td>
<td>{!! Form::text('BreakTime', '', array('class' => 'form-control BreakTime required', 'tabindex' => '3')); !!}</td>
<td>{!! Form::text('grade', '', array('class' => 'form-control required', 'tabindex' => '4')); !!}</td>
<td>{!! Form::checkbox('PM', '1', false, array('class' => 'form-control')); !!}</td>
<td>{!! Form::checkbox('NS', '1', false, array('class' => 'form-control')); !!}</td>
<td>{!! Form::checkbox('RDO', '1', false, array('class' => 'form-control')); !!}</td>
<td>{!! Form::text('OrdHours', $OrdHours, array('class' => 'form-control')); !!}</td>
<td>{!! Form::text('OT150', '3.0', array('class' => 'form-control')); !!}</td>
<td>{!! Form::select('AreaPosition', $DepartmentCodes, $contractor->AreaPosition, array('class' => 'form-control')) !!}</td>
<td>{!! Form::select('Company', $Company, $contractor->Company, array('class' => 'form-control')) !!}</td>
<td>{!! Form::submit('Submit', array('class' => 'btn btn-default submitInvoice', 'tabindex' => '5')); !!}</td>
<td><a href="#" class="AddRow">Add</a></td>
</tr>
{!! Form::close(); !!}

 @endforeach
manix
  • 13,613
  • 9
  • 64
  • 98
QuickBen
  • 25
  • 3

1 Answers1

0

Form tag cannot be an immediate child of a tbody tag.

Try wrapping the <form> tag around the <table> tag

Community
  • 1
  • 1
Pawel Bieszczad
  • 11,254
  • 3
  • 34
  • 40