Commit 98bd1473 by Francisco Salazar

select variables extra

parent 38e0f538
......@@ -14,6 +14,13 @@
</li>
@endsection
@section('content')
@php
$var=explode(",",$extra->values);
$value_array = [];
foreach($var as $result) {
$value_array[$result] = $result;
}
@endphp
<div class='row'>
<div class='col-md-12'>
<div class='box'>
......
@php
$var=explode(",",$extra->values);
$value_array = [];
foreach($var as $result) {
$value_array[$result] = $result;
}
@endphp
<div class="form-group">
{!! Form::label('variable', 'Variable') !!}
{!! Form::select('variable', $variables, null, ["class"=>"form-control", "required"=>"required", "placeholder"=>"Elija una variable"]) !!}
......@@ -23,7 +16,7 @@
<div class="form-group" id="select-values" style="display: none;">
{!! Form::label('values', 'Valores del select: ', ['class'=>'control-label'])!!}
{{ isset($extra->values) ? $extra->values : null }}
{!! Form::select('values[]', $value_array, isset($extra->values) ? explode(",",$extra->values) : null, ["id"=>"values", "multiple"=>"multiple", "style"=>"width:100%;"]) !!}
{!! Form::select('values[]', isset($value_array) ? $value_array : [] , isset($extra->values) ? explode(",",$extra->values) : null, ["id"=>"values", "multiple"=>"multiple", "style"=>"width:100%;"]) !!}
</div>
<div class="form-group">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment