Skip to content

Multiple forms for a single module #907

Answered by ifox
wratke asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @wratke!

I see 3 possibles approaches there, depending on the number of pages you'll need and their forms compositions:

  1. A single pages module, with all fields and relationships in the same Eloquent model. This can seem ugly, but the simplest way to implement if you don't have tons of pages with very different fields. In the form's Blade file, you can include a different file depending on a type you store in pages records (seeded upfront or created through the UI, with a dropdown to chose type inside the Add new modal, which you can add by overwriting create.blade.php in your module views).

  2. One module per page, which means a single record in each associated table, and no listing in …

Replies: 10 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by ifox
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@ifox
Comment options

ifox May 21, 2021
Maintainer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants
Converted from issue

This discussion was converted from issue #54 on May 17, 2021 10:55.