(1) Add the drop-down list item to the \ include \ language \ zh_cn.lang.php file.
$ App_list_strings ['account _ type_dom1 '] = array (
''=> '',
'Analyst' => 'analysts ',
'Manufacturer '=> 'manufacturer ',
'Other' => 'others ',
);
: $ App_list_strings ['abc'] type ABC indicates the name of the drop-down menu.
"=>" Indicates that the default value is -- none -- if this option is not available, the default value is the first project.
If there are two ''=>'', ''=>'', the table also has one in the list -- none -- available
(2) Call
Template page (HTML)
< Select Name = "Account_type" > {Options_account_type} </ Select > </ Slot > </ TD > <! -- NormallyCodeShould be automatically completed in the page layout -->
Editview. php
$ Xtpl-> assign ("options_account_type", get_select_options_with_id ($ app_list_strings ['account _ type_dom1 '], $ focus-> account_type ));
: $ App_list_strings is a global drop-down list array.
$ App_list_strings ['account _ type_dom1 '] indicates the name of the project set in the drop-down list.
$ Focus-> account_type is set to assign values to the drop-down list.
Account_type is < Select Name = "Message_type" > NAME value in
Detailview. php
$ Xtpl-> assign ("region", $ app_list_strings ['region _ options'] [$ focus-> region]);