AnsweredAssumed Answered

How to get form set definitions

Question asked by hkır on Mar 17, 2011
Hi,
I want to get "set" definitions via using Forms Engine. Such as:


         <form id="custom-metadata-form">
            <field-visibility>
               <show id="cm:name" />
               <show id="cm:title" force="true" />
               <show id="cm:description" force="true" />
            </field-visibility>
            <appearance>
                <set id="myset" appearance="bordered-panel" label="My Set" />
               <field id="cm:description" set="myset" />
            </appearance>
         </form>


var formsConfig = config.scoped["cm:content"]["forms"];
var form = formsConfig.getForm("custom-metadata-form");
var nativeMap = form.fields;

As I understand I need a FormField to use its getSet() function and only function in FormConfigElement that returns FormField is "public Map<String, FormField> getFields()" which returns a NativeMap. How will I use nativeMap to get the field and its set definition?

Thanks in advance for your help.

Outcomes