[eluser]juddmuir[/eluser]
Hi,
I'm sure that this is common functionality:
- Form to add an entry
- Form to edit an entry
In the latter, you need to pass in the entry id; in the former obviously you don't.
What's the accepted best practice?
1. Generate two form views, essentially the same but with the extra hidden id field in the edit form - these two forms then get submitted to controller->add() and controller->edit() functions respectively, or
2. Use the same form, with a hidden id field, submit both the same controller function, then test for non-zero value of the id field to decide whether to add or edit?
Or something else entirely?!?