Single page or two for CREATE and EDIT?


How do you do the architecture of an app? A single page for creating and editing data, or one page for each?

I ask this because both pages are very similar. Basically only data variable changes from single record type to create record type.

I tried creating a custom component for using the same fields on both pages, but got an problem because one of the fields in my component is marked as multiline but shows up as single line.

Thank you for any advice,

You can either have:

  1. input fields that populate the data into the fields as content, then check for changes and send updates to the backend when they hit a Save button, or

  2. an Edit button next to individual text fields that, when clicked, reveals a previously hidden input field that works like in #1 but only for the single field. Once they hit a Save button, send the data, update the text field, and hide the input field again

So, in both cases it’s a single page for view and create, right?

In terms of what I outlined, yes.

I suppose you could have one page that displays everything (no editing) with an “edit” button, and clicking “edit” would then take you to a second page that uses option #1. The problem with this is that you need to either check what was edited and only submit the data that changed, or you have to submit the data from everything. The latter is database intensive, and the former will require some coding.