2010-12-06 102 views
1

我正在嘗試在Drupal中創建一個cck計算字段,用於將「作業職位」節點內容類型中的cck字段的電子郵件地址複製到「作業應用程序」節點內容類型中的此計算字段中。 我發現下面的代碼完美的作品,當我把它粘貼到「計算出的代碼:」在CCK計算字段框如何格式化電子郵件鏈接在Drupal 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; 

然而,當我嘗試使用計算機的內容發送電子郵件場沒有任何反應。我相信這是因爲計算的字段沒有格式化爲mailto鏈接。我試圖更改計算字段中「顯示格式:」框中的參數,但尚未成功。 任何人都可以請幫忙嗎?謝謝!

回答