Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3488202
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T11:14:32+00:00 2026-05-18T11:14:32+00:00

I am trying to create in Drupal a cck computed field that copies an

  • 0

I am trying to create in Drupal a cck computed field that copies an email address from a cck field in a “job post” node content type to this computed field in the “job application” node content type.
I have found the following code that works perfectly, when I paste it into the “Computed Code:” box in the cck computed field

// obtain node id from nodereference cck field that links 
// the job application node to the job post node
$item_nid = $node->field_appl_position[0]['nid'];

//load and build the information from the referenced job post node
$item_node = node_load($item_nid);
$item_node = node_build_content($item_node);

//get the email address from the cck email field in the referenced job post node
$item_email = $item_node->field_job_email[0]['email'];

//copy the email address to the computed field in the job application node
$node_field[0]['value'] = $item_email;

However, when I try to send an email using the content of the computed field nothing happens. I believe this is the case because the computed field is not formatted as a mailto link. I have tried to change the parameters in the “Display Format:” box in the computed field, but have not succeeded.
Can anybody please help? Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T11:14:32+00:00Added an answer on May 18, 2026 at 11:14 am

    you can use the following Drupal API function to format your link:

    http://api.drupal.org/api/drupal/includes–common.inc/function/l/6

    so in this case the value for your computed field would be the following:

    l('Mail me', 'mailto:'.$item_email);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to create a form in drupal 6 that has multiple items
I'm trying to create a custom search interface for Apache Solr using Drupal ,
I am currently trying to create a Drupal theme as a Zen subtheme, by
I'm trying to create a custom form in Drupal 6 and everything seems to
I'm new to Drupal and trying get my head around it. I'd like to
I am new to Drupal and I am trying to figure out how to
I am building an idea capture website from the Array Shift installation profile of
On a Drupal app, my goal is to display a page with a couple
Intro I am in the process of trying to convert my first HTML/CSS design
I'm building a recipe management system for a cooking website in Drupal, and I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.