System settings form()
來自站長百科
導航: 上一頁 | 首頁 | DedeCMS | 帝國CMS | Xoops | SupeSite | PHPCMS | PHP168 | Joomla
system_settings_form($form) --很重要的一個函數(shù),在設(shè)置后臺表單時候經(jīng)常用到。主要用于為一個表單添加按鈕和設(shè)置前綴.
參數(shù):
$form 一個包含表單結(jié)構(gòu)的關(guān)聯(lián)數(shù)組。
返回值:
表單結(jié)構(gòu)。
實例:
<?php function onthisdate_admin() { $form = array(); $form['onthisdate_maxdisp'] = array( '#type' => 'textfield', '#title' => t('Maximum number of links'), '#default_value' => variable_get('onthisdate_maxdisp', 3), '#size' => 2, '#maxlength' => 2, '#description' => t("The maximum number of links to display in the block."), '#required' => TRUE, ); return system_settings_form($form); } ?>