Homd
Homd
Explore posts from servers
FFilament
Created by mxc on 11/8/2023 in #❓┊help
How to have an Action with a url() method, execute code before opening the link?
Maybe just create a custom controller for that? I can't find anything in the docs that lets you do both action and url
12 replies
FFilament
Created by mxc on 11/8/2023 in #❓┊help
How to have an Action with a url() method, execute code before opening the link?
That actually make sense haha.
12 replies
FFilament
Created by mxc on 11/8/2023 in #❓┊help
How to have an Action with a url() method, execute code before opening the link?
Forms\Components\Actions\Action::make('appointment_entry')
->label('Calendar Entry')
->icon('heroicon-m-calendar-days')
->url(function(){

$key = $this->initialise();
$counter = new Counter();
$counter->log_id = $key;
$counter->user_id = auth()->user()->id;
$counter->save();
}

return CustomerLink::where("id", "=", $this->customer->id)->get()->first()->url)
})
->openUrlInNewTab()
Forms\Components\Actions\Action::make('appointment_entry')
->label('Calendar Entry')
->icon('heroicon-m-calendar-days')
->url(function(){

$key = $this->initialise();
$counter = new Counter();
$counter->log_id = $key;
$counter->user_id = auth()->user()->id;
$counter->save();
}

return CustomerLink::where("id", "=", $this->customer->id)->get()->first()->url)
})
->openUrlInNewTab()
Something like that?
12 replies
FFilament
Created by ingmontoya on 10/14/2023 in #❓┊help
show/hide field depending on data load?
Share some code
8 replies
FFilament
Created by renatoalvarez on 7/16/2023 in #❓┊help
html + limit in text column
Sorry for reopening the thread. But I have case that I want to show the excerpt of the field but don't want it to show all the html tag (u know, it looks weird for the user). you can use this
urcolumn->formatStateUsing(fn (string $state) => __( preg_replace('/((\w+\s*){1,50}).*/', '$1...', strip_tags($state))))
urcolumn->formatStateUsing(fn (string $state) => __( preg_replace('/((\w+\s*){1,50}).*/', '$1...', strip_tags($state))))
which will strip any html tag and limit it by 50 words
6 replies
FFilament
Created by Momicchi on 10/12/2023 in #❓┊help
single relation only
remove it from header action. Or just create it as a relation field instead of relation manager maybe?
4 replies
FFilament
Created by Scott on 9/22/2023 in #❓┊help
Action button within Custom Table Column
https://filamentphp.com/docs/2.x/tables/columns/custom And define the logic on livewire.php generated
4 replies
FFilament
Created by serLar on 9/20/2023 in #❓┊help
Help... the /admin dashboard gives me a 404
make sure route exist in
php artisan route:list
php artisan route:list
3 replies
FFilament
Created by Homd on 9/19/2023 in #❓┊help
Dynamically Hidden Repeater Is Not Working
OMG, I don't even know I need to use live() flag. Thx!!!
11 replies
FFilament
Created by Homd on 9/19/2023 in #❓┊help
Dynamically Hidden Repeater Is Not Working
I'm so lost and feel defeated xD I've been stuck on this problem for 2 days which I think is fairly simple
11 replies
FFilament
Created by Homd on 9/19/2023 in #❓┊help
Dynamically Hidden Repeater Is Not Working
I've dumped $get('exercise_type_id') and it's working as expected. But the value is only being updated on page load. For example if I set the default value of my select to id of 1/2/3, it will obtain that value. But after page load finished, If I change it by form, the repeater does not get updated. It just like the id checking only happening on mount() and not render()
11 replies
FFilament
Created by Hugo on 9/18/2023 in #❓┊help
How to make a YearPicker ?
I think you need to create custom field for that. HTML doesn't provide year picker out of the box. or just create select with custom option
Select::make('status')
->options([
//Your code here to generate year
])
Select::make('status')
->options([
//Your code here to generate year
])
4 replies
FFilament
Created by NeerGreeN on 9/17/2023 in #❓┊help
Relationship between two dependent select fields
11 replies
FFilament
Created by NeerGreeN on 9/17/2023 in #❓┊help
Relationship between two dependent select fields
I think here
Forms\Components\Select::make('contact_id')
->relationship('contact', 'name', fn(Builder $query) => $query->where('customer_id', request()->input('customer_id')))
->preload()
->label(__('activities.contact_id'))
->searchable(),
Forms\Components\Select::make('contact_id')
->relationship('contact', 'name', fn(Builder $query) => $query->where('customer_id', request()->input('customer_id')))
->preload()
->label(__('activities.contact_id'))
->searchable(),
Use $get instead https://filamentphp.com/docs/2.x/forms/advanced#dependant-fields--components
11 replies
FFilament
Created by NeerGreeN on 9/17/2023 in #❓┊help
Relationship between two dependent select fields
Attach the not working code
11 replies
FFilament
Created by haritz on 9/10/2023 in #❓┊help
Issue with fullcalendar not loading well first tiem
Are you sure it's not because the chrome console taking up space which effectively decrease your screen width, could be a responsive issues
9 replies
FFilament
Created by Homd on 9/10/2023 in #❓┊help
Is it possible to get the future id of item in repeater?
Oof, ok thanks for trying to help
14 replies
FFilament
Created by Homd on 9/10/2023 in #❓┊help
Is it possible to get the future id of item in repeater?
Actually, yes I agree its better. Sadly asking for a database change require some extra work. I can't change it by myself, it's the other party that need to change it.
14 replies
FFilament
Created by Homd on 9/10/2023 in #❓┊help
Is it possible to get the future id of item in repeater?
But the answer is not created yet before the submit button is press, how do I get the future id of it?
14 replies
FFilament
Created by Homd on 9/10/2023 in #❓┊help
Is it possible to get the future id of item in repeater?
@wyChoong Yes, that is my first thought. But here each question only have one correct answer plus I want to see if it's actually possible for other use cases as well.
14 replies