Active
Project:
Prepopulate
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
22 Jan 2012 at 09:35 UTC
Updated:
21 Feb 2013 at 08:44 UTC
I have a link from a page about a teacher to create another node about that teacher. I want to pass the teacher's name into the new form.
I've created the link http://xxx.com/node/add/teacher?edit[field_teacher_name][und]=value
I've tried putting a token in, eg [node:title] but I just get the plain text '[node:title]' back.
How do I pass a token in the url?
If anyone can help me I would REALLY be grateful,
thanks
Comments
Comment #1
Fred75 commentedHello LTech,
Not sure it is still useful after such a long time, and maybe what I suggest is not good practice, but here is what I have done:
1. Install and enable Token Filter module;
2. Enable the Token filter for the input format you use in the field that contains you URL (or create a custom input format for this purpose).
This should allow tokens to be evaluated correctly when the URL is loaded.
Cheers :)
Comment #2
LTech commentedIn the end I used node reference URL to do it, although the token filter is pretty cool.
I've tried to use it for a different site I am building. I can send '..contact?edit[subject]= Inquiry about [current-page:title]' but do you know how to send node fields eg contact?edit[subject]= Inquiry about [node:field_artist_name] doesn't work.
(my page is built with panels)
Thanks for your help.