@if(session('success'))
{{ session('success') }}
@endif
@if(session('error'))
{{ session('error') }}
@endif
{!! Form::open(['route' => 'commitment.store', 'id' => 'commitmentForm']) !!}
{!! Form::label('mobile_number', 'Mobile Number') !!}
{!! Form::text('mobile_number', old('mobile_number'), ['class' => 'form-control', 'required']) !!}
{!! Form::label('full_name', 'Full Name') !!}
{!! Form::text('full_name', old('full_name'), ['class' => 'form-control', 'required']) !!}
{!! Form::label('amount_committed', 'Amount Committed') !!}
{!! Form::number('amount_committed', old('amount_committed'), ['class' => 'form-control', 'required', 'min' => 1]) !!}
{!! Form::label('commitment_frequency', 'Commitment Frequency') !!}
{!! Form::select('commitment_frequency', ['daily' => 'Daily', 'weekly' => 'Weekly', 'monthly' =>
'Monthly', 'annually' => 'Annually','custom' => 'Custom Make My Reminder'], old('commitment_frequency'), ['class' => 'form-control',
'required', 'id' =>
'commitment_frequency']) !!}
{!! Form::label('reminder_date', 'Reminder Date/Month/Customised') !!}
{!! Form::select('reminder_date_annually', [
'1' => 'January',
'2' => 'February',
'3' => 'March',
'4' => 'April',
'5' => 'May',
'6' => 'June',
'7' => 'July',
'8' => 'August',
'9' => 'September',
'10' => 'October',
'11' => 'November',
'12' => 'December'
], old('reminder_date_annually'), ['class' => 'form-control', 'id' => 'reminder_date_annually', 'style' =>
'display:none;']) !!}
{!! Form::select('reminder_date_monthly', array_combine(range(1, 31), range(1, 31)), old('reminder_date_monthly'),
['class' => 'form-control', 'id' => 'reminder_date_monthly', 'style' => 'display:none;']) !!}
{!! Form::select('reminder_date_weekly', [
'1' => 'Monday',
'2' => 'Tuesday',
'3' => 'Wednesday',
'4' => 'Thursday',
'5' => 'Friday',
'6'=> 'Saturday',
'7' => 'Sunday'
], old('reminder_date_weekly'), ['class' => 'form-control', 'id' => 'reminder_date_weekly', 'style' =>
'display:none;']) !!}
{!! Form::textarea('reminder_date_custom', old('reminder_date'), [
'class' => 'form-control',
'placeholder' => 'Enter your custom reminder description',
'id' => 'reminder_date_custom',
'style' =>'display:none;',
'rows' => '2'
]) !!}
{!! Form::submit('CREATE COMMITMENT', ['class' => 'btn btn-primary mt-4 col-12']) !!}
{!! Form::close() !!}