Is it possible to list and select the relationship in the Admin resource creation form?
For example: I'd like to list all registered users and select one to associate with the Pet I'm creating. Is there something ready to do this?

11 Replies
you have pet belongs_to user and user has_many pets ?
Please ignore the fact that they are in different databases.
Pet create action in resource
in your domain
and
see this
you can have the form (for pet creation) have an argument for user
than
IIRC if you set this on the target resource you can get multi-select/single select: https://hexdocs.pm/ash_admin/dsl-ashadmin-resource.html#admin-label_field
It's works. Thank you very much.


Is this a bug? 🤔 It turns back into a text field if you disable
label_field


Looks like a bug to me, yes
Please open an issue
Ideally if you can, reproduce that with the resources in the /dev app
In the ash_admin repo
You can run that with
iex -S mix dev
Okay, I'll try! I chose to post it here in this thread because it's already related to the initial topic.
Apologies for the delay
https://github.com/ash-project/ash_admin/issues/341
GitHub
Authentication fields render as select inputs when label_field is s...
Code of Conduct I agree to follow this project's Code of Conduct AI Policy I agree to follow this project's AI Policy, or I agree that AI was not used while creating this issue. Versions Wh...