0
votes

I am having one document type which contains a dropdown list, I need to add a couple of things in it:

  1. I need to display the Database table names in drop-down dynamically.

  2. On the change of dropdown option, i need to display the selected table columns names in another drop-down.

Are above things possible by using only existing data types or it will require creating a custom template using razor syntaxes (if it is so then how the template will display directly in the back office content node?)

Can you please provide your views and any links for code/tutorials?

screen shot of content form

1

1 Answers

0
votes

If this is for the back office, you will need to do it in HTML and Angular, with an API controller to handle the DB lookup stuff.

As far as I'm aware, there's nothing built in to do dropdowns that depend on each other, so you'd have to create a new DataType to do it.

The process is to long to detail here, but here are some useful links on creating custom DocTypes in Umbraco 7.

https://our.umbraco.org/documentation/tutorials/Creating-a-Property-Editor/ http://velstand.info/tips/umbraco/to-create-a-datatype-by-using-external-data-sources/ https://24days.in/umbraco-cms/2016/custom-property-editor-tutorial/