Alvaro Leon
How to create a resource record from another resource?
You can use a relation manager (https://filamentphp.com/docs/3.x/panels/resources/relation-managers) for a UXed solution, or you can use the method after() into the Action to trigger the Notification.
4 replies
CreateAction modal not working when TableComponent is used inside a view inside a resource in Edit
Ok, you gave an idea of how to solve it for my purpose and It's using a Page component. Also according to this (the forms html situation), sending all the modals to another part of the code (maybe a component that stores modal form 😅 ) should work. Will try both.
Thanks 😅
7 replies
CreateAction modal not working when TableComponent is used inside a view inside a resource in Edit
UPDATE:
It is kinda not working for the first table Component (I mean the one in the "Antecedentes" section), the others are OK.
Thing is, those three are the same table Component, but it seems the error is not in the component because the same thing happens with diferent table components.
7 replies
TimePicker and DateTimePicker incorrect behaviour due to {{ $field::class }}.display-text
Sorry for the delay. I'll put the button here just for not to complicate everything (that particular resource has 1210 lines of code, I know, I'm refactoring).
17 replies
TimePicker and DateTimePicker incorrect behaviour due to {{ $field::class }}.display-text
sure, there it is:
https://gist.github.com/alvleont/bef5e2b1d7c286c06646d72960000315
17 replies
TimePicker and DateTimePicker incorrect behaviour due to {{ $field::class }}.display-text
Hi. Well. The thing I'm doing is a little bit complicated, but I can explain with an example:
- I have a FormResource that allows the user to create and modify custom forms. In that resource, the user creates custom form fields, defining title, type (TextInput, Select, DatePicker, DateTimePicker and toggle), size (using 12 cols grid) and if it is required or not.
- I have a second resource FormAnswersResource, that allows the user to enter the form answers. First, the user enters and using a Select, finds the corresponding form. Then the app fills a Card with the fields with that form using the data given in the first resource.
- The user input the data, and press save to save the results of that form, which is stored into a column called "answers" into the database.
The problem is that when the form has DatePicker, DateTimePicker and Toggle components, the data is not passed nor into the validation, nor into the corresponding JSON field, then data is gone somewhere.
I'm trying to be as clear as my little english knowledge can allows me. But i'll try to find the answer, and actually i'm going to be this weekend checking what is happening in filament code.
17 replies