Here is a part of the edit interface screen XML file:
<contents> <section name="Details" > <field attribute="name"> <text width="35" height="1" /> </field> <field attribute="short_name"> <text width="25" height="1" /> </field> </section> <section name="Asset Selection" > <field> <function_call> <paint_function name="paintAssetTypes" /> <process_function name="processAssetTypes" /> </function_call> </field> </section> .. ...
Viewing the screen defined above will display two sections, “Details”, and “Asset Selection”. The Details section will have two text fields and the Asset Selection section will print custom content which is defined in paintAssetTypes() function. Attribute value must be unique for each asset.
Here is a list of most used fields in Matrix Screens. You should also look at other assets to find out how to create other type of fields.
Creates a text field with width 35 and height 1.
<field attribute="name"> <text width="35" height="1" /> </field>
Creates a text field with width 5 and removes any non integer values from the field.
<field attribute="num_per_page"> <int width="5" /> </field>
Style "list" will creates a combo box and style "boxes" will create check box list.
<field attribute="group_by"> <selection style="list" /> </field>
<field attribute="subs_only"> <boolean true_text="yes" false_text="no" /> </field>
This is a special field where the output is provided by a PHP function paintRootNode and the processing is done by the processRootNode function. Both functions are defined in asset_name_edit_fns.inc.
<field> <function_call> <paint_function name="paintRootNode" /> <process_function name="processRootNode" /> </function_call> </field>
<field attribute="active_question"> <assetid type_codes="test_asset:D" /> </field>