Relationship field extend #1315
Replies: 2 comments
-
Thank you for sharing your custom implementation for extending the relationship field in Backpack to populate additional fields when a selection is made. What you've created is similar to the functionality that users have requested in the Backpack community. There have been several discussions about enhancing the relationship field to show more information or populate other fields based on a selection. Your approach of extending the The implementation you've shared is not part of the core Backpack functionality, but it addresses a need that has been discussed in issues like Feature Request: InlineShow operation for relationship field, where users wanted to display additional information about a selected relationship. Your solution takes a different approach by actually populating other form fields rather than just displaying information, which can be very useful in many scenarios. If you're using this in a repeatable field context, you might want to check some of the discussions about relationship fields in repeatable contexts, as there have been some issues reported with that combination that might affect your implementation:
Overall, this is a nice extension of the relationship field functionality that others in the community might find useful! ℹ️ Please note our AI Bot does not reply to follow-ups, this will be the only AI answer in this thread. If the AI helped you find the answer, please mark it as answered or write details below so it can learn. Then close the conversation. If not, please give more information for when a human reads this. ℹ️ Relevant sources: Github Issue (open): [Feature Request] InlineShow operation for relationship field |
Beta Was this translation helpful? Give feedback.
-
Hello @georgedobre Thanks for sharing this knowledge with the community. Cheers. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I needed to populate some fields using the select2 + inline create (pro), so i have modified fetch_or_create_blade to do something like this
fill_inputs.mp4
If it's not something new i apologize, just thought to share. My code for the relationship looks like this
EstimateCrudController - product select
js that was added in fetch_or_create
Beta Was this translation helpful? Give feedback.
All reactions