biebthesecond
disableOptionsWhenSelectedInSiblingRepeaterItems fails with multi-select
I have a repeater with a multi-select field, I don't want the same answers to be inputted in different repeater rows. But the method ->disableOptionsWhenSelectedInSiblingRepeaterItems() doesn't seem to work with multi-select. If I remove ->multiple() it works as it should. Am I doing something wrong?
Repeater::make('second.questions')
->hiddenLabel()
->minItems(1)
->reorderable(false)
->schema([ TextInput::make('question')
->label(('Question')), Select::make('answers')
->label(('Followup from answer(s)'))
->options(function (Get $get) {
return $this-> flattenAnswerArray($get('../../../first.answers'), true);
})
//->searchable() ->multiple()
->disableOptionsWhenSelectedInSiblingRepeaterItems()
/->native(false),
]),
2 replies
Dynamic wizard checkboxlist selects all
Good afternoon, on a custom livewire page I have a wizard which the user gets to right after registering their website to us. In the wizard they can configure some things, the second step of the option gives the user a choice between two radio buttons.
Dependent on the choice they get a dynamic third step, on of those results is a checkboxlist. But when I click anything they either all select or deselect. I saw some other posts, but I felt like those didn't really apply to this scenario. It's probably a skill issue, but I feel kinda stuck. I hope anyone can help me with this
I saw in another post that this worked, but I already have it:
I have a feeling its because of the $get() which makes the wizard step dynamic, but that also doesn't make sense I think?
Next to that I've tried removing the match, no results.
3 replies
Fileupload Maxsize not working?
Today I was testing some file uploads with max file sizes, and of course the server responded with a "413(Payload Too Large)". So I implemented a 12mb max upload size
->maxSize(12288)
. But when I tested it a again it seemed as if the validation didn't even happen, the fileuploader got stuck again and the server returned the same 413 error.
I've also tried to add ->live()
which didnt work. I've tried to updating the max upload size in the livewire config, didn't work either. Furthermore I have the maxuploadsize defined as php.ini is 100m
I have a feeling it might have something to do I'm handling the upload in the ->afterStateUpdated(function (?Model $record) { //code })
. But even then I would just expect it to show a error to the user that the max filesize is X amount.
Is it a bug that the validation is not working or am I missing something?14 replies
Table row action not working
Good morning, I have a filament table on a custom livewire page in which I want to put a row action. So I did just that according to the documentation. But when I click the action in the table it shows a short loading icon and then does nothing. What does work is if I put ->url('someurl')->openUrlInNewTab(). So it definitely triggers the action, but it doesn't reach the ->action() method for some reason.
I have a feeling it might have to do with that the results are based on a query and not a model. But I'm not sure. So any help would be appreciated.
The table query:
The action:
5 replies
Transfer data from form to Action Form
Hey Everyone,
On my website there's a file input that on change has to activate a modal action with additional fields. In that action there's also a file input field. I want to be able to transfer the inputted files in the form to the ones in the action.
I have of course tried the fillForm() method, but that function seems to run on loading the page and not on calling the action, so the data to transfer doesn't exist yet. There's probably a event to be called, but I haven't been able to figure it out yet and the documentation doesn't tell to much about this.
The file input in fillForm() expects data be like this: [ '<possible_directory>/<filename>.<format>', ].
The data you get from the form is exactly that. So that should work.
I hope someone can help with this.
1 replies