@extends('master') @section('title', $poll->title) @section('content')

{{ $poll->title }}

{!! $poll->desc !!}

{!! Form::open(['url' => '#', 'id' => 'form_poll', 'poll_id' => $poll->id]) !!} {!! Form::hidden('number_hidden_required', $poll->getOptions->where('otype', '0')->count(),['id' => 'number_hidden_required']) !!} {!! Form::hidden('object_id', $object, []) !!}
    @foreach($poll->getOptions as $option) @if($option->otype == "0")
  • {{ $option->title }}
    @if($option->not_apply == "1") N/A @endif @for ($i = 1; $i <= $option->number_answers; $i++) {{ $i }} @endfor
    N/A = No Aplica
  • {!! Form::hidden('field_id_'.$option->id, null, ['id' => 'field_id_'.$option->id, 'required']) !!} @endif @if($option->otype == "1")
  • {{ $option->title }}
    @if($option->is_required == "1") {!! Form::text('field_id_'.$option->id, null, ['id' => 'field_id_'.$option->id, 'required', 'class' => 'form-control']) !!} @else {!! Form::text('field_id_'.$option->id, null, ['id' => 'field_id_'.$option->id, 'class' => 'form-control']) !!} @endif
  • @endif @if($option->otype == "2")
  • {{ $option->title }}
    @if($option->is_required == "1") {!! Form::textarea('field_id_'.$option->id, null, ['id' => 'field_id_'.$option->id, 'required', 'class' => 'form-control', 'rows' => 5]) !!} @else {!! Form::textarea('field_id_'.$option->id, null, ['id' => 'field_id_'.$option->id, 'class' => 'form-control', 'rows' => 5]) !!} @endif
  • @endif @if($option->otype == "3")
  • {{ $option->title }}
    @if($option->is_required == "1") {!! Form::number('field_id_'.$option->id, null, ['id' => 'field_id_'.$option->id, 'required', 'class' => 'form-control']) !!} @else {!! Form::number('field_id_'.$option->id, null, ['id' => 'field_id_'.$option->id, 'class' => 'form-control']) !!} @endif
  • @endif @if($option->otype == "4")
  • {{ $option->title }}
    @if($option->is_required == "1") {!! Form::email('field_id_'.$option->id, null, ['id' => 'field_id_'.$option->id, 'required', 'class' => 'form-control']) !!} @else {!! Form::email('field_id_'.$option->id, null, ['id' => 'field_id_'.$option->id, 'class' => 'form-control']) !!} @endif
  • @endif @endforeach
{!! Form::submit('Enviar mis respuestas', ['class' => 'btn btn-success']) !!} {!! Form::close() !!}
@endsection