Hi,
I am using GridField on a custom form I've created in the front-end. The page I am serving gets a main record ID from the URL and the idea is to then show objects on the page with nice GridField editor.
The main object whose ID is passed via URL parameter has has_many relationship to items I am trying to create using the Gridfield.
This is what I got in terms of Form generation: http://www.sspaste.com/paste/show/53bc6560b45c0
(there is extra layer of indirection as I've got booking requests linked to itineraries but that is not important for the example)
It works great in terms of listing all the elements if I manually specify the relation in the new item dialog, however, how do I automatically pre-fill that field? What happens is that the new element gets loaded on a new page, which loses the ID parameter, therefore I need to select the relation manually if I need it.
How can I dynamically define defaults for newly created GridField objects?
(I am using https://github.com/webbuilders-group/silverstripe-frontendgridfield to facilitate the edits but it is just encapsulation over GF)