[html form] use __linkto url parameter value as a default value of the corresponding field in a creation form (closes #2407770)
--- a/web/formfields.py Mon Jul 09 12:22:43 2012 +0200
+++ b/web/formfields.py Mon Jul 09 12:24:05 2012 +0200
@@ -360,7 +360,7 @@
if self.eidparam and self.role is not None:
if form._cw.vreg.schema.rschema(self.name).final:
return form.edited_entity.e_schema.default(self.name)
- return ()
+ return form.linked_to.get((self.name, self.role), ())
return None
def example_format(self, req):