DEV Community

Discussion on: Conditional Input Fields in Livewire: This or That but Never Both

Collapse
 
dimitrim profile image
Dimitri Mostrey

The conditional radio will work. Extracting the table fields in their own properties is the correct way as well. Your proposal is elegant and easy to read/maintain. The other way is with actions, which is sometimes an overkill.

It seems your code is not 'LiveWire saveable' because there is no validation. I guess you probably know that. Hence the title of your post.

Collapse
 
kengitahi profile image
Kennedy Gitahi

Yes, I did not add the validation because the focus was on the input functionality. Perhaps I should have noted the validation when mentioning saving the data to the database