views:

77

answers:

3

what's better to have a view for create and one for edit or one for both ?

+4  A: 

That might depend on your situation. If the create form is significantly different from teh edit form then two views, otherwise one view.

Sometimes you find that create requires either fewer or more fields depending on whether the user is allowed to edit all fields or not. Sometimes it leads to a lot of extra logic to switch the fields off. In those cases, two views is simpler to maintain.

Vincent Ramdhanie
+2  A: 

Depends on who's creating and who's editing.

You may not want to have people who can create something be able to modify each individual field, but someone who edits would need to be able to modify most, or all, fields.

It can make the view cleaner to the users if they don't have to look at everything for both creating and editing.

John at CashCommons
+2  A: 

From my experiense it is better to have separate views for creating and for editing. In such way you will get more straightforward logic and more maintainable code even if with little doubling

kilonet