Reputation: 3965
Appending /createObject?type_name=Document&id=some_id_value
to an folderish object's URL works. However trying the same with other field-names, doesn't: /createObject?type_name=Document&title=some_title_value
, will not work, neither with the uppercased field-name Title
, instead of title
.
Then, I wanted to read the value of the URL with Javascript on the edit-form and insert it into the title-field, but the URL is redirected to /portal_factory/Document/document.2015-08-25.2537358109/edit
, so the parameter isn't available anymore, then.
So now, I was about to manipulate the browser's history, to be able to read it of window.referral
, but that's very bad practice.
Is it possible at all, to pass a title to the createObject
-method or is there any other possible solution known without the need, to have the edit-form be customized, respectively create a dedicated one?
A Dexterity-solution would be welcome, too.
Update:
What I would actually like to know, is the last location of which the link ("Add page") was clicked. That gets lost, due to the redirect.
Relates to:
Provide a default value on a field also on edit form
Upvotes: 1
Views: 268
Reputation: 121
You could customize portal_skins/plone_scripts/createObject/manage_workspace so that it accepted an optional title parameter, though this works only up to Plone 4.x; the script no longer exists in Plone 5.
Upvotes: 1