0
votes

I have the following HTML (an excerpt):

<div class="col-span-6 sm:col-span-4">
    <x-jet-label for="name" value="{{ __('Name') }}" />
    <x-jet-input id="name" name="name" type="text" class="mt-1 block w-full" autofocus wire:model="name"/>
    <x-jet-input-error for="name" class="mt-2" />
</div>
<div class="col-span-6 sm:col-span-4">
    <x-jet-label for="platform" value="{{ __('Platform') }}"/>
    <label>
        <input type="radio" class="platform-select" name="platform" value="xbox" wire:model="platform">
        <img src="{{ asset('img/platforms/xbox.png') }}" class="icon">
    </label>
    <label>
        <input type="radio" class="platform-select" name="platform" value="PS" wire:model="platform">
        <img src="{{ asset('img/platforms/ps.png') }}" class="icon">
    </label>
    <label>
        <input type="radio" class="platform-select" name="platform" value="stadia" wire:model="platform">
        <img src="{{ asset('img/platforms/stadia.png') }}" class="icon">
    </label>
    <label>
        <input type="radio" class="platform-select" name="platform" value="pc" wire:model="platform">
        <img src="{{ asset('img/platforms/pc.png') }}" class="icon">
    </label>
    <x-jet-input-error for="platform" class="mt-2" />
</div>
<div class="col-span-6 sm:col-span-4">
    {{ __("We will race on ") }}
    <select class="border-gray-300 focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50 rounded-md shadow-sm mt-1 track" wire:model="day">
        <option value=""></option>
        <option value="">Sundays</option>
        <option value="">Mondays</option>
        <option value="">Tuesdays</option>
        <option value="">Wednesdays</option>
        <option value="">Thursdays</option>
        <option value="">Fridays</option>
        <option value="">Saturdays</option>
    </select>

And then I have this component:

<?php
namespace App\Http\Livewire\Championships;

use Livewire\Component;

class Details extends Component
{
    public $name;

    public $platform;

    public $day;

    public $time;

    public $date;

    public $roundCount;

    public function render()
    {
        return view('championships.detail-form');
    }
}

The only element that binds to a model, is the name. The rest just does not update.

I am very new to livewire (this is my first livewire form) so I'm unsure how to debug. To me, it looks exactly the same, and on a change, should update, however, I've had no luck.

Can someone tell me what is wrong here?

Maybe something important has been omitted as when I tried this in a fresh Laravel/Livewire install, the bindings worked as expected. Maybe add any other relevant code for the view/component?Peppermintology
This is everything that there is. I copied and pasted and the only thing I left out is code further down on the html. The rest is all complete. I've played with it a bit more, and it's not even firing the request to the backend.Bird87 ZA
Ensure that you don't have multiple outer div elements in your view as Livewire expects just one and having more than one can had side effects.Peppermintology