Sanchit Patil
Is there any way to get tenant information on login page?
Hello,
I want to get tenant (team) information on login / registration page.
i am currently using filament's multi tenancy for single team per user and invitations.
Invited users are using team's subdomain for logging in,
I want to get the Team's infomation on login page, and i tried this but it is returning null.
Is there any way i can get this?
3 replies
Hide Navigation (top) on certain custom pages
Hello,
Would it be possible to hide top navigation on certain custom pages?
I want to change login process by adding one custom page after user logged in, but i want that page to be Filament Page without Navigation.
I am using this solution by LaravelDaily to change the login process & want to hide the navigation on SwitchAccountPage custom filament page.
Aslo, how can i check on every page / resource of candidate panel for a candidate_id cookie if the cookie is not set then it should redirect user to SwitchAccountPage. ?
Thank you in advanced. 🙂
2 replies
Error with FileUpload in Livewire nested component
Hello All,
I am using Filament forms in one of the Livewire components which is nested in another full-page Livewire component.
filpond field is throwing the bellow error in the console when I upload the file the first time,
Uncaught (in promise) TypeError: Cannot read properties of null (reading 'insertBefore')
But it works perfectly when I try to upload the file a second time (without page reload).
FileUpload in my form schema:
Form in view file:
Could anyone please help with this?
Thank you 🙂
5 replies
Max Selectable Options in Checkbox List
Hello,
Is there any way I can limit the Checkbox list with Max selectable options?
I have around 50+ options to select from and I want users to only select any 5 options. After 5 options it should not let the user check any checkbox.
currently, I am just preventing this by using rules.
Could anyone please suggest anything? 🙂
Thank you.
10 replies
Ngnix not loading dynamic assets in production
#offtopic
Does anyone have any idea about the issue of ngnix not loading assets (image files) in production (nginx)
these files are from the phone-input plugin
I have even manually added it to the vhost file
still, it is being considered as a static PNG file and the call is not going to Laravel route.
On the other end livewire.js is working perfectly though.
Could you please help with this if you have any ideas?
thank you, 🙂
2 replies
How to handle formWizard with random fields in LiveWire component?
Hello,
This might be off topic, but I really struggling with this.
I am generating a form Wizard with 10 random questions, but the questions (fields) got changed each time when i click next step.
I am generating Form Schema with this,
and loading that in my Livewire component
Livewire loading random records from the model with each next action request.
Could anyone please help me with this? is there any better way to avoid this or load random entries with first load or page refresh only?
Thank you. 🙂
2 replies
Passing parameters to a custom page
Hello all,
could anyone please help me with passing parameters to a custom page (not associated with any resource)?
I am doing something wrong here?
This works when I accept the parameter in livewire style but the filament shows the Admin panel's menu when I send the parameter.
/trainer/attendee-sheet/12 -> This page shows the admin panel's navigation.
/trainer/attendee-sheet -> This page shows correct navigation.
8 replies
Specific Relation Manager in Custom View
Hello,
How to display individual relation managers in custom view?
Is there any way to show a specific relation manager using this code snippet?
Also, would it be possible to enable CRUD operations for relation managers in the custom view page?
Thank You. 🙂
9 replies
viteTheme not working on Production
Hello All,
I am using a custom theme with filament, and it is working perfectly locally. (both with npm run dev & build)
but not working on production.
Vite is still using this syntax to load the custom theme files on the production
<script type="module" src="http://[::1]:5173/@vite/client" data-navigate-track="reload"></script><link rel="stylesheet" href="http://[::1]:5173/resources/css/filament/admin/theme.css" data-navigate-track="reload" />
my env file is set to production, i have cleared all the cache,
remove node_modules and install it again on production
site build on production,
but still, it is not working.
provider:
->viteTheme('resources/css/filament/admin/theme.css')
vite.config.js
theme.css
tailwind.config.js
Could anyone please help me?
Thank you. 🙂
10 replies
use SideNavigation for lg breakpoint
Hello,
Is there any way I can use Sidebar navigation for the screens below lg?
By default, I am using TopNavigation but it is not looking that great for the screens below lg (because of the number of menu items).
Thank you. 🙂
2 replies
CreateAction not doing anything after click
Hello,
I am trying to add CreateAction to a custom page but when I click on the button it doesn't do anything, not even producing any js error.
View File:
the same works when I call this action from header actions.
could anyone please help me with this? Am I doing anything wrong here?
Thank You. 🙂
6 replies
Load Schema / Reuse Schema
Hello All,
Is there any better / official way to load or reuse schema to avoid code duplication?
currently, I am doing it by storing it in a class inside App\Filament\Schema namespace.
<?php
namespace App\Filament\Schema;
use Closure;
use Filament\Forms\Components\DatePicker;
use Filament\Forms\Components\Grid;
use Filament\Forms\Components\Hidden;
use Filament\Forms\Components\TextInput;
use Filament\Forms\Components\Toggle;
use Squire\Models\Timezone;
class EventTypeScheduleSchema
{
function getSchema() : array {
return [ //schema ];
}
}
and in actual form method
->createOptionForm($etschema->getSchema())
Could you please help with this? 🙂
Thank you.
19 replies
Make field not to be saved into the database
Hello,
I do not want one field to be saved into the database. just want it to enable other fields.
ButtonGroup::make('event_availability')
->label('How do you want to offer your availability for this event type?')
->options([
'stored' => 'Use an existing schedule',
'custom' => 'Set custom hours',
])
->gridDirection('column')
->reactive(),
is there any way to achieve this?
as I am getting a Laravel error while saving the data:
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'event_availability' in 'field list'
Could you please help me with this?
5 replies
How to use custom rule with other field's data?
Hello All,
Could you please help me with this custom rule here?
i want to compare multiple field's data here to validate this field.
In custom_duration text field i want to check if custom_duration_select is hrs or min
as per the value selected, i want to validate the custom_duration number
i tried with a request post, but it is not getting validated.
Sorry, I am completely new to Livewire.
Thank you in advanced. 🙂
TextInput::make('custom_duration')->label('')
->placeholder('Custom Duration')
->default(30)->numeric()
->requiredIf('event_duration','custom')
->rules([
function () {
return function (string $attribute, $value, Closure $fail) {
$c_d_select = Request::post('custom_duration_select');
if (($c_d_select === 'hrs' && $value > 12) || ($c_d_select === 'min' && $value > 720)) {
$fail("less than or equal to 12 hrs.");
}
};
},
]),
ButtonGroup::make('custom_duration_select')
->label('')
->options([
'min' => 'min',
'hrs' => 'hrs',
])
->default('min'),
2 replies