Auto-Enable Toggle
Hey - As the title suggests: I'm trying to auto-enable a toggle-button. I tried treating it like a checkbox via
Toggle::make('MyToggle')->default(true)
but to no avail. I tried to use 1 or "on" as states, still nothing. Anyone has an idea on how to acchieve this?9 Replies
are you on the edit or create page
Neither. Using a form-page to display information. So it's not bound to anything.
and how are you filling data into the form
That is what I wanna do with this in fact. π It's sort of an overwiew-page whereas the toggles shall show what has been done and what not, which is why I want it to be enabled. π
$this->form->fill([])
?
pass your data as an array?
plesse check the getting started docsJesus - I keep forgetting that!
could you please make the function available in the parent-class, so it shows up in the IDE?
not our responsibility IMO, its a Livewire method
also, if i added it to the parent class you wouldnt be able to customize the parameters in the child class
so its a breaking change and unnessecarily limiting
ah okay - I see. Okay. Thanks again! (Imma go into my little moron-corner... π )