multi select selected options
I'm using the multi select as documented in https://twill.io/docs/form-fields/multi-select.html#multi-select, but I can't find a way to mark options as selected by default.
B
bmasquio•402d ago
Got it. I created a model accessor. The problem was that it was not returning the collection as expected. I discovered it would use the array item with the key 'id'. So I had to adapt the accessor, as my 'getRoles' function would return an array of strings.
protected function observatoryRoles(): Attribute
{
return Attribute::make(
get: fn() => $this->getRoles()->map(function ($item) {
return ['id' => $item];
})
);
}
S
Somnath•93d ago
How I implemented this?
https://discord.com/channels/811936425858695198/1207262433161379870
1.4KMembers
View on DiscordWant results from more Discord servers?
More Posts[3.0.0-rc4] - How to show current value in a select form fieldCurrently I have my select field defined as:
`@formField('select', [
'name' => 'work_year',
[3.0.0-rc4] Images not found on remote server - League\\Glide\\Filesystem\\FileNotFoundExceptionI just went from my local to my remote server and some images are showing up others are getting a 5[Twill2] Do settings section support media and how?As title says, is it possible to inject media here or should I make a custom settings singleton to h[3.x.dev] Call to undefined method ReflectionUnionType::getName()Newbie to Twill here.
Fresh install of Laravel 10.4.1 / PHP 8.2.4 / MYSQL 8.0.32 on Ubuntu Budgie 2Add custom icons into twillI add the icons into the path `resource/views/admin/icons` and I run the command, result is ok, but Select an another block in a block?Hi everyone,
I have a function to create a new block with name "Columns block". With this block, usMedia Library / Glide only loading JPEGsHey there,
So I had a Laravel/Twill app running successfully on a subdomain with no issue.
Today IAdding a vue componentGood afternoon Tell me what could be the problem?
On the main page of the admin panel there is an aSave title in translationsI'm trying to save my title as a translatable field, normal fied works fine but when i make it transSet translations to activeWhile trying to set translations to active it isn't saved to database?
Only english is selectable