1

I've been using Laravel Collective for my forms and I seem to have encountered an issue with textareas. One that won't let me update null textarea fields with the same code I would use for a text field. I think the issue is with 'null' as it allows me to change the field if the textarea has text loaded. Does anyone know how to fix this so I can change null fields with textareas?

{!! Form::label ('otherinfo', 'Other information:') !!}
{!! Form::textarea ('otherinfo', null, array('class' => 'form-control', 'required' => '', 'maxlength' =>'1500') ) !!}
Karl Hill
  • 12,937
  • 5
  • 58
  • 95
detinu20
  • 299
  • 3
  • 20

1 Answers1

1

Your example should work fine. Make sure you update your Controller to accept and save the value that is present in $request->input('otherinfo').

<?php
    $otherinfo = 'Hello World';
?>

<div class="form-group">
    {!! Form::label('otherinfo', 'Other information:') !!}
    {!! Form::textarea('otherinfo', $otherinfo, ['class' => 'form-control', 'size' => '50x3']) !!}
</div>
Karl Hill
  • 12,937
  • 5
  • 58
  • 95