How to reference to a Sitefinity Form in a Custom Field - Front- & Back-End Development - Front- & Back-End Development - Progress Community
 Front- & Back-End Development

How to reference to a Sitefinity Form in a Custom Field

  • How to reference to a Sitefinity Form in a Custom Field
  • I am working on a custom Sitefinity module in which I need to add a custom field where I can select a Sitefinity Form from a list of existing defined forms on the backend. What is the best approach to do this? Precisely how should I approach in defining the field and making its UI?

    Unfortunately when I select "Related Data" as field type, Sitefinity Form is not available in the list of built-in data types. The other option (advanced option) I see is a GUID (or array of GUIDs) field type among field types which suggest making a custom code.

    CMS version is Sitefinity 8.2 in this project and we are using MVC-based feather components as well as our custom MVC components to develop the website.

    Anybody had similar requirement and experience on this?

  • Hi Behrooz

    If you are using feather. You can use this in you widget designer

    <sf-form-selector sf-model="selectedItems" sf-filter="filterObj" />

    And you need to add "sf-form-selector" to list of components in .json configuration file

     

    You can find more information about this component here github.com/.../sf-form-selector.js

  • Thank you Victor.

    Maybe my question was not clear enough. I am working at Module Builder level not widgets for the page level.

    You see, I am making a custom field on the module which must display a list of forms. I was looking for something like this approach but I guess I have to start from scratch using this method as described.