pocket.racer
pocket.racer
FFilament
Created by pocket.racer on 2/2/2025 in #❓┊help
Is there a way to get current step number in Form Wizard?
width: 100% doesn't work either. The only thing that work so far is something like width: 600px; or w-96. But that is specific width. If only i can remove the flex class in the parent div
14 replies
FFilament
Created by pocket.racer on 2/2/2025 in #❓┊help
Is there a way to get current step number in Form Wizard?
Here u go (in exchange, do you know the answer to make the next button full width?)
Wizard::make($steps)
->columnSpanFull()
->nextAction(function (Action $action, Wizard $component): void {

if ($component->getCurrentStepIndex() === 0) {
$action->label('Next Step')
->extraAttributes([
'class' => 'w-full', // does not work can you help?
]);
}
});
Wizard::make($steps)
->columnSpanFull()
->nextAction(function (Action $action, Wizard $component): void {

if ($component->getCurrentStepIndex() === 0) {
$action->label('Next Step')
->extraAttributes([
'class' => 'w-full', // does not work can you help?
]);
}
});
14 replies
FFilament
Created by pocket.racer on 2/2/2025 in #❓┊help
Is there a way to get current step number in Form Wizard?
bump
14 replies
FFilament
Created by pocket.racer on 2/2/2025 in #❓┊help
Is there a way to get current step number in Form Wizard?
The Next button html itself through the browser dom. my w-full is applied
<button style="--c-400:var(--primary-400);--c-500:var(--primary-500);--c-600:var(--primary-600);" class="fi-btn relative grid-flow-col items-center justify-center font-semibold outline-none transition duration-75 focus-visible:ring-2 rounded-lg fi-color-custom fi-btn-color-primary fi-color-primary fi-size-md fi-btn-size-md gap-1.5 px-3 py-2 text-sm inline-grid shadow-sm bg-custom-600 text-white hover:bg-custom-500 focus-visible:ring-custom-500/50 dark:bg-custom-500 dark:hover:bg-custom-400 dark:focus-visible:ring-custom-400/50 fi-ac-action auto-cols-max w-full fi-ac-btn-action" type="button" wire:loading.attr="disabled" wire:target="dispatchFormEvent">
<button style="--c-400:var(--primary-400);--c-500:var(--primary-500);--c-600:var(--primary-600);" class="fi-btn relative grid-flow-col items-center justify-center font-semibold outline-none transition duration-75 focus-visible:ring-2 rounded-lg fi-color-custom fi-btn-color-primary fi-color-primary fi-size-md fi-btn-size-md gap-1.5 px-3 py-2 text-sm inline-grid shadow-sm bg-custom-600 text-white hover:bg-custom-500 focus-visible:ring-custom-500/50 dark:bg-custom-500 dark:hover:bg-custom-400 dark:focus-visible:ring-custom-400/50 fi-ac-action auto-cols-max w-full fi-ac-btn-action" type="button" wire:loading.attr="disabled" wire:target="dispatchFormEvent">
14 replies
FFilament
Created by pocket.racer on 2/2/2025 in #❓┊help
Is there a way to get current step number in Form Wizard?
if i remove flex through browser dom it works (The next button become full width), but that's not a working solution obviously
14 replies
FFilament
Created by pocket.racer on 2/2/2025 in #❓┊help
Is there a way to get current step number in Form Wizard?
the parent div of the Next action button is this
<div class="flex items-center justify-between gap-x-3 px-6 pb-6">...</div>
<div class="flex items-center justify-between gap-x-3 px-6 pb-6">...</div>
14 replies
FFilament
Created by pocket.racer on 2/2/2025 in #❓┊help
Is there a way to get current step number in Form Wizard?
yea doesn't work. I also tried flex-auto grow w-full min-w-full basis-full Only way i can get it to work is remove "flex" from the parent div in the browser dom. But that is outside of extraAttributes()
14 replies
FFilament
Created by pocket.racer on 2/2/2025 in #❓┊help
Is there a way to get current step number in Form Wizard?
ok. i figured it out (injecting $component) But i haven't figure out how to get the button to be full width yet
14 replies
FFilament
Created by pocket.racer on 2/2/2025 in #❓┊help
Is there a way to get current step number in Form Wizard?
bump!
14 replies
FFilament
Created by pocket.racer on 1/24/2025 in #❓┊help
How do you make the submit button of a form wizard do a require confirmation dialog?
hmm not really sure what u mean
5 replies
FFilament
Created by pocket.racer on 12/7/2024 in #❓┊help
CreateAction not showing in relation manager table header action in view page
thank you
6 replies
FFilament
Created by pocket.racer on 12/7/2024 in #❓┊help
CreateAction not showing in relation manager table header action in view page
bump!
6 replies
FFilament
Created by ℬℴ𝒿𝒿𝒾 on 9/17/2023 in #❓┊help
Checkbox List Default
thank you
16 replies
FFilament
Created by ℬℴ𝒿𝒿𝒾 on 9/17/2023 in #❓┊help
Checkbox List Default
looks like i solved it by not using ->default() on the create page, time to sleep
16 replies
FFilament
Created by ℬℴ𝒿𝒿𝒾 on 9/17/2023 in #❓┊help
Checkbox List Default
panel builder create resource page
16 replies
FFilament
Created by ℬℴ𝒿𝒿𝒾 on 9/17/2023 in #❓┊help
Checkbox List Default
My code is something like this
Select::make('checklist_template_id')
->label('Checklist Template')
->live()
->visible(fn (Get $get) => $get('model_id') !== null)
->relationship('checklistTemplate', 'name'),

CheckboxList::make('results')
->live()
->options(function (Get $get): array {

$checklistTemplateId = $get('checklist_template_id');

$checklistTemplate = ChecklistTemplate::find($checklistTemplateId);

if (! $checklistTemplate) {
return [];
}

if ($checklistTemplate->checklist_class) {
$checklistClass = ChecklistManager::getChecklistClass($checklistTemplate->checklist_class);

$checklistObject = new $checklistClass(Order::find($get('model_id')));

return $checklistObject->getKeys();
}

return $checklistTemplate->checklist_keys;
})
->default(function (Get $get) {
ray('checklist-default-called');
$checklistTemplateId = $get('checklist_template_id');

$checklistTemplate = ChecklistTemplate::find($checklistTemplateId);

if (! $checklistTemplate) {
return [];
}

if ($checklistTemplate->checklist_class) {
$checklistClass = ChecklistManager::getChecklistClass($checklistTemplate->checklist_class);

$checklistObject = new $checklistClass(Order::find($get('model_id')));

$result = $checklistObject->getKeysThatAreTrueFromAutoChecks();

return $result;

}

return [];
})
->visible(fn (Get $get): bool => $get('checklist_template_id') !== null)
->bulkToggleable(),
Select::make('checklist_template_id')
->label('Checklist Template')
->live()
->visible(fn (Get $get) => $get('model_id') !== null)
->relationship('checklistTemplate', 'name'),

CheckboxList::make('results')
->live()
->options(function (Get $get): array {

$checklistTemplateId = $get('checklist_template_id');

$checklistTemplate = ChecklistTemplate::find($checklistTemplateId);

if (! $checklistTemplate) {
return [];
}

if ($checklistTemplate->checklist_class) {
$checklistClass = ChecklistManager::getChecklistClass($checklistTemplate->checklist_class);

$checklistObject = new $checklistClass(Order::find($get('model_id')));

return $checklistObject->getKeys();
}

return $checklistTemplate->checklist_keys;
})
->default(function (Get $get) {
ray('checklist-default-called');
$checklistTemplateId = $get('checklist_template_id');

$checklistTemplate = ChecklistTemplate::find($checklistTemplateId);

if (! $checklistTemplate) {
return [];
}

if ($checklistTemplate->checklist_class) {
$checklistClass = ChecklistManager::getChecklistClass($checklistTemplate->checklist_class);

$checklistObject = new $checklistClass(Order::find($get('model_id')));

$result = $checklistObject->getKeysThatAreTrueFromAutoChecks();

return $result;

}

return [];
})
->visible(fn (Get $get): bool => $get('checklist_template_id') !== null)
->bulkToggleable(),
16 replies
FFilament
Created by ℬℴ𝒿𝒿𝒾 on 9/17/2023 in #❓┊help
Checkbox List Default
->default() did not get applied when I'm creating too for Checkboxlist
16 replies
FFilament
Created by pocket.racer on 9/6/2024 in #❓┊help
How to hide placeholder of file upload field?
is it the ->meta() method?
12 replies
FFilament
Created by pocket.racer on 9/6/2024 in #❓┊help
How to hide placeholder of file upload field?
false is not possible, in filament code it only accept null, closure or string
public function placeholder(string | Closure | null $placeholder): static
{
$this->placeholder = $placeholder;

return $this;
}
public function placeholder(string | Closure | null $placeholder): static
{
$this->placeholder = $placeholder;

return $this;
}
I tried all 3, doesn't remove that big white rectangle box
12 replies
FFilament
Created by pocket.racer on 9/6/2024 in #❓┊help
How to hide placeholder of file upload field?
->placeholder('') tried before, still got that big white rectangle on top ->placeholder(false) i haven't try
12 replies