Hi,
I'm attempting to use this module to prepopulate a field on a node edit form. The node already exists & its URL is rewritten by the Pathauto module , & its edit URL is rewritten by the Subpath Auto module. So:
The node's actual node nid is 207 & its Pathauto-rewritten URL is /gaylords/3.
Its edit page is at /gaylords/3/edit.
Due to the requirements of the site design, I cannot access the node edit form via its unaliased URL. Attempting to use the Prepopulate URL function with the rewritten URL doesn't seem to work. Am I missing something? Is there a way to make Prepopulate work with URLs that don't have the form ?edit or &edit?
Regards,
Henry
Comments
Comment #1
Anonymous (not verified) commentedWell I figured it out, & it works. This is the URL that worked:
https://somesite.com/gaylords/3/edit?edit[field_gaylord_received_term][und]=gaylord_receivedhttps://somesite.com/gaylords/3/editis the URL alias created by Subpath Auto & appending the?edit[field_gaylord_received_term][und]=gaylord_receivedto it worked.However, the URL was being passed to the node by an Entityform form & it was producing urlencoded characters that prevented Prepopulate from working. My fix was to insert the following into a custom module using hook_form_alter to take over the Entityform's redirect on submit function & use one that passed a urldecoded URL. Like so:
Maybe this will help somebody else in future. By the way, the field I am prepopulating is a term reference field, autoselect tag widget, & I'm inserting the term rather than the term ID.
Cheers,
H.