Sugarcrm main table field-custom drop-down menu

Source: Internet
Author: User
(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]);

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.