question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

CRUD : Adding Multiple Child Records (1-n relationships) on related CRUD form?

See original GitHub issue

Hey,

If you feel this is too redundant or not the place to pose this question, feel free to blast this post away. @tabacitu is usually super-tuned in to these posts. I have searched through the tickets and Google, but I’m not sure I am asking the question the right way… or if there is even an answer out there…

I am running into situations where I have a Model that I would like to add multiple related (child) records too, using just one CRUD form. Some examples would include adding multiple files… but let’s start small. I have found the following posts that have similar topics, but not clear answer on the best way to do this.

Is the best way to use the table Field Type? https://laravel-backpack.readme.io/docs/crud-fields#section-table But, I guess the drawback is not having validation on the child records?

A similar tutorial to this one would be cool: https://backpackforlaravel.com/articles/tutorials/nested-resources-in-backpack-crud

So, an example would be where I have a Journey model and would like to add multiple Chapters to the Journey directly on the same Journey CRUD form.

Let me know if this question makes sense… and any suggestions/advice you can share.

Thanks, JFK

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
tabacitucommented, Dec 2, 2019

Update: We still don’t have a built-in solution for this.

But a possible solution would be to have a 1-n field that allows you to add items (plus button that opens a modal with a form for the child record, hit save and it would be added to the db and selected in the select). It’s mentioned elsewhere in our Github as “adding items on the fly”.

This third-party package had a solution for Backpack v3, but for Backpack v4 we’re working on a first-party solution. I’ll try to update this thread as we work towards a complete solution for Backpack v4.

Sorry for the bad news.

1reaction
BinaryBlockcommented, May 1, 2017

Sorry… I realized this isn’t a bug and should be posted via another channel: http://stackoverflow.com/questions/43723259/crud-adding-multiple-child-records-1-n-relationships-on-related-crud-form

Closing this “Issue”.

Read more comments on GitHub >

github_iconTop Results From Across the Web

CRUD : Adding Multiple Child Records (1-n relationships) on ...
I am running into situations where I have a Model that I would like to add multiple related (child) records too, using just...
Read more >
CRUD Operations on Multiple Tables - TypeORM - YouTube
How to do CRUD Operations in TypeORM on multiple tables.Code: https://github.com/benawad/typeorm- crud -stuff----If you like cooking, ...
Read more >
CRUD multiple records in Django models - Web Forefront
In this section you'll learn how to work with multiple records in Django ... records, which are then used to create related child...
Read more >
What is a CRUD app and how to build one | Ultimate guide
Within this guide you will learn what a CRUD app is, how to build a CRUD ... Create allows you to add new...
Read more >
CRUD (Reference) - Prisma
How to perform CRUD with Prisma Client. ... your data is in a uniform shape and matches the model defined in the Prisma...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found