I have a node where I want to take some fields from a user's profile and their email addres. The workflow happens so that first the user registers, then submits their event. I don't want them to have to fill-in their fields again like name, email, and website. Any tips on getting these in as computed fields? Also, the field "website" is optional, so what happens if they don't fill that in?
Comments
Comment #1
wrunt commentedIn your computed code try something like this:
To get the email, use $user->mail instead of $user->name.
Comment #2
Lisa Williams commentedThis works great -- thanks. One question: when we display the username, is there a way to wrap the username in a link to the user's profile?
Comment #3
Christefano-oldaccount commentedJust a guess (I haven't yet used Computed Field in a project), but try
$node_field[0]['value'] = theme($user->name);Comment #4
Lisa Williams commentedThanks, I'll try it!
Comment #5
Lisa Williams commented....mmm, nope, didn't work for me. Thanks for the suggestion -- every experiment gets me closer to success, right?
Comment #6
Lisa Williams commentedHmm...this post may explain why urls aren't appearing in computed fields:
Comment #7
Moonshine commentedClosing out old Drupal 4.7 issues, as it is no longer a supported release.