Orchid\Screen\Builder with CheckBox/Radio buttons and repository data #3053
Replies: 1 comment
-
|
In HTML, <input value="{{ $value }}">However, <input type="radio"
value="persistent_value"
{{ $value === 'persistent_value' ? 'checked' : ''}}>These values are not provided by the user-they are fixed options. The user’s selection among these predefined options should instead be represented using the Therefore, the I hope this explanation helps clarify how it works. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
How could I use the Orchid\Screen\Builder with passing a data to populate the form which includes CheckBox and Radio buttons for same "name" attribute, for example:
$builder = new Builder($fields, $repository);
My fields could be like:
CheckBox::make('field_name.')->placeholder('Checkbox 1')
CheckBox::make('field_name.')->placeholder('Checkbox 2')
OR
Radio::make('field_name')->placeholder('Radio option 1')
Radio::make('field_name')->placeholder('Radio option 2')
Which is the best way to prepopulate the generated form? How the $repository data should looks like?
Beta Was this translation helpful? Give feedback.
All reactions