HiJoe
HiJoe
Explore posts from servers
FFilament
Created by HiJoe on 6/21/2024 in #❓┊help
Spatie Translatable package for Filament
Hi, I recent have installed the filament plugin for spatie translations. Only I kind of dislike the current way of working and I was wondering a couple of things, I could not find the a plugin docs. - Instead of a dropdown, can I have like a tab that changes between the configured languages - Can all the other languages inherit the original (for me en) text into the text boxes? So you can exactly see what you need to translate.
4 replies
FFilament
Created by HiJoe on 9/23/2023 in #❓┊help
Fieldset / Grid to array/json
No description
7 replies
FFilament
Created by HiJoe on 9/15/2023 in #❓┊help
New instantly creates a new record
No description
5 replies
FFilament
Created by HiJoe on 8/29/2023 in #❓┊help
Infolist index page + dynamic modal form
Hello, I wonder if I can make a admin page as follows. - I want a infolist page as index, so showing the database records as cards with icon etc. - Use the modals (v2 simple modal) to create a new entry -- Make one select box that will render out the rest of the form depending on the selection
8 replies
FFilament
Created by HiJoe on 4/12/2023 in #❓┊help
Render form elements based on selection (dynamically)
Hi! I'm using the Form Builder standalone but I have a question regarding rendering. My Livewire component now has this:
// ...
<div class="modal-body">
{{ $this->form }}
</div>
// ...
// ...
<div class="modal-body">
{{ $this->form }}
</div>
// ...
My Form schema looks like this:
protected function getFormSchema(): array
{
return [
Select::make('key')
->label('Vault type')
->options(VaultService::getVaults())
->required(),

// value
];
}
protected function getFormSchema(): array
{
return [
Select::make('key')
->label('Vault type')
->options(VaultService::getVaults())
->required(),

// value
];
}
But based of the selected vault I want to load a form form the belonging vault class. That whole formset should become value as a array. Please let me know if you need more info
24 replies
FFilament
Created by HiJoe on 3/14/2023 in #❓┊help
Hidden value filled by other input
Hi! What would be the best way to have InputA in the form visible where the user can type something and have InputB hidden in the form that is populated by something from InputA. - InputA you fill in a Discord username - After typying is done you fetch the userid from the discord user - InputB (hidden in the form) will be populated with the discord userid - Create record. And InputB will be sent off as value for creating that record. What would be the right way to do so?
TextInput::make('player')->reactive()
->afterStateUpdated(function (Closure $set, $state) {
$set('uuid', $ID);
}),
TextInput::make('uuid')->hidden(),
TextInput::make('player')->reactive()
->afterStateUpdated(function (Closure $set, $state) {
$set('uuid', $ID);
}),
TextInput::make('uuid')->hidden(),
5 replies