I am trying to make my input field disabled or readonly if a button is not yet pressed but I am having problems with posting/submitting it to the database after I added a condition which makes it disabled or readonly

```
    <form action="{{ route('amber.timestone.home.start', $task->id) }}" method="POST" class="align-center">
                                {{csrf_field()}}
                            <td>
                                <input class="my-2" type="text" name="ref" value="{{ $task->ref }}"
                                    @if(empty($task->start))
                                        readonly
                                    @endif
                                >

public function startTask($id)
    {
        $user = Task::find($id);
        $user->start = Carbon::now();
        $user->save();
        return back();
    }
public function endTask($id, Request $request)
    {
        $user = Task::find($id);
        $user->end = Carbon::now();
        $start = Carbon::parse($user->start);
        $end = Carbon::parse($user->end);
$user->ref = request('ref');
        $user->remarks = request('remarks');
        $user->campaign = request('campaign');
        $user->type = request('type');
            $hours = $end->diffInHours($start);
            $minutes = $end->diffInMinutes($start);
            $seconds = $end->diffInSeconds($start);
            $user->duration = $hours . ':' . $minutes . ':' . $seconds;
            $user->update();
            return back();
        }

```

I tried adding hidden with the same names as for those who are with readonly condition still not working