Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I have a form with a drop down list on it. The client wants to manage the values in the DDL via the CMS. Which is the best approach, I was thinking a CSV list on the form doctype, or create a custom DDL datatype and use the values from that?
You should be able to define a datatype based on the "ultimate picker" where you can set a root node on the content section and then create a branch, with the possible values in the drop down list instead.
You should be able to fetch the possible values in your user control as well.
Hope this helps.
So have a node in the content section called for example "DDL Values", then created nodes under this that are the DDL values? Why would I need a new datatype?
I'm thinking about a structure like this
DLL values (could be doctype: dllvalues) value (could be doctype: dllvalue) value value etc.
For each value you need you create a value document type, with or without any custom properties on it.
If you do the above you need a datatype based on for instance MultiNodeTreePicker from uComponents or the Ultimate Picker datatype where you can specify a dropdownlist, which is fetching the content from the "DLL values" node.
In this way you can place a picker on the rest of your normal pages, where you can select the from the values stored in the "DLL values" branch. This way you just need to add or remove values once the picker has been setup and configured on the pages where you need it. (In the forms documentype in your case).
If you have a list of CSV files you can use CMSimport to import and map them to the value doctypes (if it's less than 500 it's free to use, if it exceeds this limit you'll need to pay 99€ if I remember correctly.)
Hope this outlines my suggestion a little better - hope it makes sense to you.
Ah, I follow what you mean, however, I need the values on a form within a user control. From my understanding it's not possible to add a custom data type on a user control?
I got round the issue by creating a [DLL Values] doctype then a DLL Value doctype as suggested and created
in the content tree. Then I used a foreach loop to add the values from each node to my DDL within the user control.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted