U4-7030 - Using radiobuttonlist prevalue editor

Created by Rune Strand 27 Aug 2015, 14:00:03 Updated by Sebastiaan Janssen 18 Jul 2018, 13:25:08

Tags: Up For Grabs PR

Relates to: U4-8987

Relates to: U4-9003

When creating prevalues for a custom property editor you can choose a radiobuttonlist as a view, it's a default view located in /Umbraco/Views/prevalueditors/radiobuttonlist.html.

I would expect to be able to set prevalues for the radiobuttonlist in /App_Data/MyEditor/package.manifest Eg: prevalues: { fields: [ { label: "Options", description: "Some options to choose from", key: "defaultOptions", view: "radiobuttonlist", prevalues: [ "option 1", "option 2", "option 3" ] } ] },

Comments

Bjarne Fyrstenborg 03 Nov 2015, 13:44:08

Furthermore there should be a "checkboxlist" prevalueditor and maybe an option to choose if checkboxes/radiobuttons should be listed vertical (default) or horizontal (which could float vertically on narrow screens). Horizontal presentation of the list might be a good choice if you only have 2-4 options.

An example where you might want to use radiobutton list/checkbox list is for weekdays: https://github.com/bjarnef/Umbraco-CMS/blob/0dbf686a0fa3bf8c3f4c701498b7b457ee9998f6/src/Umbraco.Web.UI.Client/src/views/propertyeditors/datepicker/weekdays.prevalues.html


Asbjørn Riis-Knudsen 03 Aug 2016, 07:05:53

Also, the prevalues should be objects, so that you can specify both a key that will be stored and a user-friendly value to show, since those will rarely be the same.


Dan Patching 08 Jul 2018, 12:57:49

I've figured out how to implement this, so i'll make a PR in an hour or 2.


Dan Patching 08 Jul 2018, 13:35:48

https://github.com/umbraco/Umbraco-CMS/pull/2763


Priority: Normal

Type: Feature (request)

State: Fixed

Assignee:

Difficulty: Normal

Category:

Backwards Compatible: True

Fix Submitted: Pull request

Affected versions: 7.0.0, 7.1.0, 7.0.1, 7.0.2, 7.0.3, 7.0.4, 7.1.1, 7.2.0, 7.1.2, 7.1.3, 7.1.4, 7.1.5, 7.3.0, 7.1.6, 7.1.7, 7.1.8, 7.1.9, 7.2.1, 7.2.2, 7.2.3, 7.2.4, 7.2.5, 7.2.6, 7.2.7, 7.4.0, 7.2.8, 7.3.1

Due in version: 7.12.0

Sprint:

Story Points:

Cycle: