F
Filament10mo ago
KarlisJ

Free text radio option

As a simple example, a radio field "Your favorite color?" with values red , green , and other (please specify) and when other is chosen input is shown that allows entering any value. I think this is quite common behaviour in web forms but struggle to find a good solution. I can have text input depending on radio and display it only when other` is selected but: 1 . The UI feels off, since they are separated out 2. I can't set the value of radio from input since it has fixed allowed values, so I have to create a third hidden field. Has someone created this setup?
4 Replies
DrByte
DrByte10mo ago
Filament Daily
YouTube
Filament Select: Add New Option "On-the-fly"
If you have a Select dropdown with a relationship, you can easily add a new option without leaving the active form.
DrByte
DrByte10mo ago
(from FilamentDaily YT)
KarlisJ
KarlisJ10mo ago
Thanks for your response, but both examples are not what I need.