線上使用者

目前共有 0 位註冊使用者3 位訪客 在線上。

新會員

  • xyz
  • arsisthesis
  • selly
  • cxm1234
  • joyce

書籍推薦

又來打擾您了...請教有關 profile 的問題

1 reply [最新回應]
大德

我在使用 signup 模組,有修改theme_signup_user_form() 自訂欄位

$form['signup_form_data']['Name'] = array(
'#type' => 'textfield',
'#title' => t('Name'),
'#size' => 40, '#maxlength' => 64,
'#required' => TRUE,
);

$form['signup_form_data']['UnitName'] = array(
'#type' => 'textfield',
'#title' => t('UnitName'),
'#size' => 40, '#maxlength' => 64,
);

有在設定 讓NAME 這欄位的預設值 為 USER NAME,是可以的
if ($user->uid) {
$form['signup_form_data']['Name']['#default_value'] = $user->name;
}

但又試這帶入 profile 模組 內 自訂欄位的 值 到 signup user form 內的自訂欄位嗎..

我試著帶入 但 出現的 值 都為 0 ....
if ($user->uid) {

$form['signup_form_data']['UnitName']['#default_value'] = $user->profile-profile_unit;

profile-profile_unit 帶入到 UnitName 的值 都只是 0 ...
我要如何解決...讓 在profile 自訂的欄位值 能帶內 signup內呢..

Arthur Yu
Arthur Yu 的照片
User offline. Last seen 1 日 40 分鐘 ago. Offline
Joined: 12/17/2007
試看看

Hello,

請問大德在 Profile 的欄位是叫做 profile_unit 嗎 ? 如果是的話,就請試看看改用 $user->profile_profile_unit 看看,就是改成都用底線試試哩 !...

供參囉!!

阿舍...
阿舍的 Drupal 架站經驗談
http://drupal.soa.tw

發表新回應

此欄位內容將保密,不會公開顯示出來。
  • 自動將網址與電子郵件位址轉變為連結。
  • 可使用的 HTML 標籤:<a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • 自動斷行和分段。

更多關於格式化選項的資訊

BloggerAds

Facebook Page

Drupal 新聞

Translate


訂閱服務...

最新回應

阿舍的隨手....