mxc
mxc
FFilament
Created by mxc on 11/30/2023 in #❓┊help
Select Input populated via db query and setting default option?
Awesome @Leandro Ferreira A quick test of form->fill() seem to do the trick. Will hack it a bit and work out any wrinkles.
10 replies
FFilament
Created by mxc on 11/30/2023 in #❓┊help
Select Input populated via db query and setting default option?
I have tried '->default(1)' but it hasnt worked.
10 replies
FFilament
Created by mxc on 11/30/2023 in #❓┊help
Select Input populated via db query and setting default option?
I tried this to test but still can't get the right option selected: public function mount() { $this->customer = Models\Customer::find(1); } I think there are 2 issues. Setting a default value with "default" doesn't work as the options array is being loaded asynchronously so the value is not available when "default" fires. Secondly how to change the selected option when the action button is clicked. Please let me know if I am anwsering your question. Maybe I misunderstood.
10 replies
FFilament
Created by mxc on 11/30/2023 in #❓┊help
Select Input populated via db query and setting default option?
Hi @Leonardo Ferreira , I am using it in a form builder. Its a custom page. If I could figure out how to change a selects value programatically I think I could find a way to do what I need to do. Basically I have a form and an page header action. When the page header action button is clicked I want it to change the values in the drop down box based on what a varibale values is.
10 replies
FFilament
Created by mxc on 11/30/2023 in #❓┊help
Object of class Filament\Support\Enums\MaxWidth could not be converted to string
I just moved the vendors folder out of resources. So far so good ....
4 replies
FFilament
Created by mxc on 11/30/2023 in #❓┊help
Object of class Filament\Support\Enums\MaxWidth could not be converted to string
Dam. Just after posting Google finally returns https://github.com/filamentphp/filament/issues/9908
4 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?
The answer is use HtmlString as suggested by @Leandro Ferreira
12 replies
FFilament
Created by awsqed on 10/27/2023 in #❓┊help
Single/double quote is encoded when using extraAttributes
Thanks will give it a try.
6 replies
FFilament
Created by Mark Chaney on 3/7/2023 in #❓┊help
extraAttributes() for tables
6 replies
FFilament
Created by awsqed on 10/27/2023 in #❓┊help
Single/double quote is encoded when using extraAttributes
I also have this issue. Did you find a solution?
6 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?
Trying to use
)->extraAttributes(["x-on:click" =>"\$wire.log_calendar_entry(); window.open('".$this->calendar_url."', '_blank');"]),
)->extraAttributes(["x-on:click" =>"\$wire.log_calendar_entry(); window.open('".$this->calendar_url."', '_blank');"]),
but getting what appears to be issues around escaping apostrophes.
Alpine Expression Error: expected expression, got '&'

Expression: "$wire.log_calendar_entry(); window.open('https://customerlink.co.za', '_blank');"
Alpine Expression Error: expected expression, got '&'

Expression: "$wire.log_calendar_entry(); window.open('https://customerlink.co.za', '_blank');"
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?
Ok so I can do something like this in the blade template.
<button x-on:click="$wire.log_calendar_entry(); window.open('{{$this->calendar_url}}', '_blank');">
Click 2
</button>
<button x-on:click="$wire.log_calendar_entry(); window.open('{{$this->calendar_url}}', '_blank');">
Click 2
</button>
is there a way to have this added to the action in the form definition programatically? I.E. I don't need to go and move my actions out of the form to make them blade templates?
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?
Trying to figure out how to send a redirect from the action method.
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?
Ok, might be the only way.
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?
Thanks @Homd when I tried this it would log the click when the url is generated for the page and not when it was clicked so it would record a click per page view. Let me test again.
12 replies
FFilament
Created by mxc on 10/18/2023 in #❓┊help
Return infolist from component in a modal from an action?
Ok got it working. I added an action to the table->actions([..]) method.
->actions([
Tables\Actions\EditAction::make(),
Action::make("view_contact")
->label("View")
->modalContent(view('livewire.customer-contact-view',["show_info"=>true]))
])
->actions([
Tables\Actions\EditAction::make(),
Action::make("view_contact")
->label("View")
->modalContent(view('livewire.customer-contact-view',["show_info"=>true]))
])
Then
->recordAction(''view_contact")
->recordAction(''view_contact")
4 replies
FFilament
Created by mxc on 10/17/2023 in #❓┊help
Modal Form in Action Specify Columns?
Thanks @awsqed
7 replies
FFilament
Created by mxc on 10/15/2023 in #❓┊help
Select component with searchable & live?
Thanks for the tip. I used orderBy for the sorting. It didn't solve my problem. I have in the meantime created another form with different models and linked select components and it works fine. I have no idea what the difference betweenthem is that causes the 1 to work and the other not. I am investigating. The code is the same excpet for the models being queried.
4 replies
FFilament
Created by mxc on 10/8/2023 in #❓┊help
Custom route with path parameters for custom page
Ok the error is due to as I had it registered for navigation and it requires an id in the url. I removed it from the navigation component with "protected static bool $shouldRegisterNavigation = false;" Now it works.
8 replies
FFilament
Created by Sanchit Patil on 9/28/2023 in #❓┊help
Passing parameters to a custom page
Ok the error is due to as I had it registered for navigation and it requires an id in the url. I removed it from the navigation component with "protected static bool $shouldRegisterNavigation = false;" Now it works.
8 replies