Can we add/edit the choices field in Module Builder? - General Discussions - General Discussions - Progress Community
 General Discussions

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

  • Can we add/edit the choices field in Module Builder?
  • 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.
  • 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!
  • thanks for the information. I really want to know about this thing. :)
  • 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
  • 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).
  • 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