Dynamic value for my widget

0
Hi Mx team support, Due to I have customized widget and I need to get dynamic value from model. I mean option of widget. Example Scenario. I double click at customized widget, it will show option as my customized but I would like to know on how to create select attribute from entity for widget option. In my understand I have to customize at xml but I don't know syntax or statement on this case. Thank you very much.
asked
1 answers
2

Here's some sample code from the XML in the feedback widget.

For selecting an entity:

<property key="entity" type="entity" required="false">
            <caption>User</caption>
            <category>Data source</category>
            <description>If this property is set, the username and email address properties can be used to prefill the users identy in the submit form.</description>
</property>

For selecting an attribute on that entity:

<property key="usernameattr" type="attribute" entityProperty="entity" required="false">
    <caption>Username attribute</caption>
    <category>Data source</category>
    <description>This property can be used as username of the user.
    </description>
    <attributeTypes>
        <attributeType name="String"/>
    </attributeTypes>           
</property>
answered