Closed (won't fix)
Project:
Content Profile
Version:
6.x-1.0
Component:
Base module
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
4 Oct 2010 at 15:36 UTC
Updated:
12 Feb 2015 at 15:20 UTC
Jump to comment: Most recent
Comments
Comment #1
jdln commentedSubscribing
Comment #2
serg.remote commentedsubscribing
Comment #3
robbertnl commentedAny suggestion already?
Comment #4
blauerberg commentedsubscribing
Comment #5
Rob_Feature commentedUnfortunately the webform module maintainer has no intention of supporting content profile...which is too bad, but that means there won't be support to do this. See #244152: CCK, Content Profile and Webform
Comment #6
tonytosta commentedHere's some simple code to implement a 'ghetto' token. Its not pretty, but I thought I would share....
Comment #7
gumrol commentedContribooting.
Thanks @tonytosta - your code was most helpful. I took your code and made it a bit more generic, so one can replace multiple tokens in a form. The only thing is: I broke your 'Multiple tokens to one field' logic. I just replace 1-1, but I'm sure the code can be modified fairly easily to accomplish this.
One just needs to get the naming of your fields right in your replacement string from CCK and it should just work. Sorry for the mixed naming conventions - pushed on a deadline and don't have time to change the older code to my convention.
So if you have a surname field in cck named field_surname - your token would be %content_profile[field_surname]
Comment #8
rade commentedThanks @gumrol, this was just what I needed!
To others whom might use this solution as well: Note the first parameter given to content_profile_load is the name of the content type that acts as a profile. On the site I'm updating now that content type was called 'member' instead of 'profile', as it is user configurable. So make sure you edit this line where needed: