.. _widget-featurepanel-form-label: ==================== FeaturePanel_Form ==================== Widget that displays features attributes (fields) in a Ext.form.FormPanel. Only one feature can be displayed at a time in the form. Each attribute (field) that has to be displayed in the form must be defined in the options of the widget. In addition, the field must also be defined in the corresponding DataStore. The FormPanel can be displayed in a Ext.Window if inWindow is set to true, else it can be normally added to an existing panel in the template. The following widgets can use the FeaturePanel_Form widget (using the tag) : * :ref:`widget-editfeature-create-label` * :ref:`widget-editfeature-update-label` XML Sample ------------ Sample configuration of the widget : .. code-block:: xml W_FeaturePanelForm_GMapCities true GMap cities edition true 150 150 name textfield reg_code textfield pop_range combo capital combo In addition to the widget definition, the DataStore must have some nodes defined. If a field has then any combobox created will have these values. Example : .. code-block:: xml DS_FS_DEV4G_GMAP_POPP S_FS_DEV4G gmap_popp GMap Cities (FS) name Name string reg_code Reg # integer pop_range Population integer 1 Less than 10,000 2 More than 10,000 3 More than 50,000 4 More than 100,000 5 More than 250,000 6 More than 500,000 capital Type integer 0 City 1 National Capital 2 Province Capital 3 Territory Capital Mandatory Options ------------------- N/A Optional Options ------------------ :inwindow: Boolean. Default is 'false'. Display the panel in a Ext.Window if set to 'true'. :defaults: The default properties of the ext items (fields) of the panel. Can be any Ext.form.'chosen_form_xtype' properties. Here's some possible useful tags : * width * editable * mode * triggerAction * lazyRender * lazyInit * listWidth .. seealso:: `ExtJS Documentation `_ :windowoptions: The options used by the Ext.Window. Any property set will overwrite its corresponding default value. Possible tags can be any Ext.Window properties. Some possible useful tags : * autoScroll: (optional) set to 'true' to allow autoscrolling inside the form * title: (optional) the text to display in the title bar of the window .. seealso:: `ExtJS Documentation - Ext.Window `_ :fields: contains nodes :field: Must be set in the node. Define each ExtJS property you want the field to have here. Possible tags can be any Ext.form.'chosen_field' properties. Some are required : * name: (required) the name of the field, as defined in the DataStore * xtype: (required) the type of form element to render the field. Currently support only two : combo, textfield * isfid: (optional) indicates if the field should be sought in the *id* geojson object rather than in the *properties* list * width: (optional) the width of the element * fieldLabel: (optional) to set a new fieldLabel property if no node was defined in the DataStore field or if you simply want to redefine the text to display in front of the element * disabled: (optional) to set the field as **readonly** * ... and any ExtJS property of the corresponding xtype... Service Type -------------- featureserver Widget Action -------------- read