atabegruslan
Explore posts from servers1 Select input depends on another Select input's value. Select's options populated by DB table's col
Currently I got this
Model is a select menu, it can be Aaa or Bbb.
Model_id is also a select menu,
How can you achieve the below:
If Model is selected to have a value of Aaa,
then Model_id's options will be:
1:aaa1
and 2:aaa2
are read from DB table aaas
's id
and name
columns.
If Model is selected to have a value of Bbb,
then Model_id's options will be:
1:bbb1
and 2:bbb2
are read from DB table bbbs
's id
and name
columns.7 replies
Conditionally add and update relations
Currently I got this situation.
A user can have only 1 shipping address and only 1 billing address.
In Filament's admin panel's user form, admin can change user's info.
However I want to set restrictions, so that admin cant give a user >1 address of type shipping, and cant give a user >1 address of type billing.
That also implies that when the user already got 1 billing address, the admin can't change that user's shipping address to type=billing.
How can something like that be done?
16 replies
Select menu. Enum. How set default-selected
I got a field in DB and model, which is an enum type. Something like this:
['xxx', 'yyy', 'zzz']
In filament, I did:
In the DB, the field stage
is already set to yyy
. But the menu still displays xxx
9 replies
Display some fields only on item-edit or item-create pages
Is there a way to let some fields only appear on edit pages, and some other fields to only appear on create pages?
Currently whatever displays on create page also displays on the edit page, because they are both based on
public static function form(Form $form): Form { ...
of the Resource file.3 replies
How add multiple images for 1 item
In the item edit page, 1 item can have 1 or many images. The number of images can vary.
How can I make a type of input, where after user uploads 1 image, a new image-uploading input appears and ready to handle another image upload.
Building something like this would be easy in React, but how can you make something like this in Filament?
3 replies