1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / General Discussions / Can we add/edit the choices field in Module Builder?

Can we add/edit the choices field in Module Builder?

6 posts, 0 answered
  1. Dan Sorensen
    Dan Sorensen avatar
    256 posts
    Registered:
    13 Aug 2010
    21 Dec 2011
    Link to this post
    Is it possible to edit/add to the choices field in a custom module using Module Builder?

    It is working great so far for me. I just want to know if I must plan ahead to add all possible choices or if we will be able to open up the choices field later and add or edit (spelling) of a drop down menu choice.
  2. SelAromDotNet
    SelAromDotNet avatar
    912 posts
    Registered:
    18 Jul 2012
    21 Dec 2011
    Link to this post
    My understanding is that in this first release of the module builder, the choice field items are defined only at the View level, that is the Backend definitions for the Add, Edit, Preview, List views. So there currently isn't, say a separate table against which these items are validated or can be modified, not yet anyway (the team is working hard on it!)

    However, the view definitions are actually fully defined in the DynamicModulesConfig.config file in the App_Data/Configurations folder for Sitefinity.

    Each module should have its own contentViewControl node, and within that, four separate backend views (List, Insert, Edit, Preview). Within those views you should be able to find the Choice field you defined and modify it as needed.

    If your changes aren't reflected immediately, try restarting the site by saving the web.config file.

    A note of caution: do be careful when editing this file, as it is used directly by the backend to initialize all views for Module Builder content types!

    Expect this story to improve greatly in future releases, and let me know if you have any issues. thank you for your feedback!
  3. Laura Gale
    Laura Gale avatar
    1 posts
    Registered:
    31 Jul 2012
    21 Dec 2011
    Link to this post
    thanks for the information. I really want to know about this thing. :)
  4. Hristo Borisov
    Hristo Borisov avatar
    190 posts
    Registered:
    19 Jun 2017
    21 Dec 2011
    Link to this post
    Hello everyone,

    Thank you for the feedback. The module builder is going to see a lot of improvements in the upcoming months. There is nothing that stops us for even making the choice fields retrieve its values on demand from a web service. However, add/edit are currently with much bigger priority.

    Thank you for the feedback and involvement once again.

    All the best,
    Hristo Borisov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  5. Dan Sorensen
    Dan Sorensen avatar
    256 posts
    Registered:
    13 Aug 2010
    21 Dec 2011
    Link to this post
    Quick performance is my first priority, so I don't currently need to retrieve the select values from a database, a config file is fine. However, it would be nice to know the official way to edit the items. (add one or fix a misspelling. I understand how removing one could cause data issues (nulls) on previously entered data).
  6. SelAromDotNet
    SelAromDotNet avatar
    912 posts
    Registered:
    18 Jul 2012
    21 Dec 2011
    Link to this post
    Actually, because there is no persisting of the choices, you can theoretically pass any string value into it (for example, using the API). of course this will cause issues when you open the item to edit it since the selected value won't be in the dropdown list.

    but again, this dropdown list is populated using that config file for the definition. so this is definitely where you would go in to correct/update the list of choices for these fields. remember, they're just populated by what you initially created, but are in no way bound to anything else (at least right now, as far as I know in the current release).

    i hope that makes sense and is helpful! someone from the dev team might have more insight, and remember that this might change in a future release. but in a pinch, this should get you where you need to be
6 posts, 0 answered