Do you want to create just one radio button?
You must use this code:
{{ Form::radio('NAME', 'VALUES', true, ['class' => 'form-control']) }}
Or this:
<input class="form-control" checked="checked" name="NAME" value="VALUES" type="radio">
I am displaying a list of results and you need to select one of these in the list of results to continue. However I need to pass some more values with the radio.
If I put an array in the second argument it throws and expected 'string' error and if I use an array as the 4th and last argument no values are passed
Hi Thanks for your response. Upon some research I dont think its possible to have multiple values in a radio, however I used some piped data in the value attribute and used php explode to put them into an array for retreival.
Form::radio('destinationValues',
$destination->RegionID.'|'.
$destination->RegionName.'|'.
$destination->ParentRegionID,
false)
$radioValues = explode('|',$formData['destinationValues']);
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community