Orchid\Screen\Builder with CheckBox/Radio buttons and repository data #3053
Unanswered
plamenradev
asked this question in
Q&A
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. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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?
All reactions