More in this section
Forums / Developing with Sitefinity / How to reference to a Sitefinity Form in a Custom Field

How to reference to a Sitefinity Form in a Custom Field

The forums are in read-only mode. In case that you want to directly contact the Progress Sitefinity team use the support center. In our Google Plus group you can find more than one thousand Sitefinity developers discussing different topics. For the Stack Overflow threads don’t forget to use the “Sitefinity” tag.
3 posts, 0 answered
  1. Behrooz
    Behrooz avatar
    9 posts
    Registered:
    28 Jul 2015
    13 Jun 2016
    Link to this post

    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?

  2. Victor Leontyev
    Victor Leontyev avatar
    65 posts
    Registered:
    01 Jul 2014
    13 Jun 2016
    Link to this post

    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 https://github.com/Sitefinity/feather/blob/476361c219ba974f45a4fc3f4fee409ec6e9ea51/Telerik.Sitefinity.Frontend/client-components/selectors/forms/sf-form-selector.js

  3. Behrooz
    Behrooz avatar
    9 posts
    Registered:
    28 Jul 2015
    14 Jun 2016 in reply to Victor Leontyev
    Link to this post

    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.

3 posts, 0 answered