Skip to content
This repository has been archived by the owner on Apr 3, 2024. It is now read-only.

Function Data Value Kind #57

Closed
Nicholas-Westby opened this issue Aug 26, 2016 · 0 comments
Closed

Function Data Value Kind #57

Nicholas-Westby opened this issue Aug 26, 2016 · 0 comments
Assignees

Comments

@Nicholas-Westby
Copy link
Contributor

See this forum post: https://our.umbraco.org/projects/backoffice-extensions/formulate/formulate-questions/79575-customize-data-value-section

If a new data value kind is created that allows the content editor to pick a class that implements a particular interface, they can have any function they want that returns a list of strings that can then be used to populate the data values for a drop down. They could do anything they want in that function, such as query a database or make a call to a web service.

In the process of implementing this data value kind, I should also make the drop down use data value kinds in a more generic manner. Right now, the drop down is hardcoded to recognize only the DataValueList data value kind. There should be some interface that new data value kinds can implement so that the drop down list can extract the necessary data from any data value kind implementing that interface (rather than restricting it to a single implementation).

A nice to have would be to also allow for different labels and values for each item in the list (in case the items in the drop down differ from the value that should be sent to the server).

@Nicholas-Westby Nicholas-Westby self-assigned this Aug 26, 2016
Nicholas-Westby added a commit that referenced this issue Aug 28, 2016
…ueList to be used as the data value sources for drop downs: #57
Nicholas-Westby added a commit that referenced this issue Aug 28, 2016
…nction: #57

Included a function that returns US states as an example to be used with the new data value kind.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant