5098 Posts in 1518 Topics by 1115 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 160 Views |
-
SS3 ModelAdmin - Display blank form after create

20 October 2012 at 8:09am
I'm using ModelAdmin with the default form scaffolding, to manage a complicated database of related objects.
Something along the line of Company has_many Employees, each Employee has_many Notes.
When creating Notes, after clicking the Create button a nice little "Saved" message appears and the user remains on the edit form for the just created Note.
Is there a way it can be setup so the user is either taken to a blank "Create" form or the GridField listing of all Notes for that Employee after Creating a Note? This could save a lot of clicks for a user creating many Notes in a row for one Employee?
Thanks.
-
Re: SS3 ModelAdmin - Display blank form after create

23 October 2012 at 11:48pm
I don't think there is, at the moment. The GridFieldDetailForm::doSave() redirects including the new ID, so the form will interprete it as an edit request.
It should be possible to subclass the GridFieldDetailForm and its Link() method to leave out the ID based on some condition. Then make sure the the subclass is used in the GridField
Martine
| 160 Views | ||
|
Page:
1
|
Go to Top |

