I'm working with Umbraco Forms on Umbraco7 . I want to create a custom field type that is a dropdown but has some additional value set to the options.
e.g
I want to add the following prevales
Red
Blue
Green
Black
But I want to be able to assign a number to each prevalue e.g
Red 10
Blue 100
Green 99
Black 123
So when that option is selected in the form in the front end - I can retrieve this value and do something with it...
I'm trying to a apply a custom radio button list field type to my form but I'm not sure where I can get the code to have the Prevalues input field added (see screenshot below for reference). I looked at the perplex steroids package but couldn't find a custom radio button list. I would greatly appreciate if you could help me out with this or point me in the right direction. Here is the link to my original post, https://our.umbraco.com/forum/umbraco-forms/94001-radio-button-list-html-file-locationpath
Did you manage to do that ? I'm trying to do something similar with prevalues.
Jeffrey, I'm sorry but I can't find any information on custom prevalues field ?
I want to create a multiple choice with a specific value for each entry.
I was linking to the documentation about creating your own fields. You'll still need to some coding, but I think the documentation is a good start. And if you want to see some examples of how we've implemented it, you could see that in our package.
Thanks but none of those examples are with prevalues, we want the user to setup the values of the choices and add a score per entry (could be the id) but that doesn't seem to be possible ?
Hey John, You can create Enums in your project and use them as a pre values for the custom dropdown list property in the umbraco back office. "Nu Pickers" library is the one which will help you out to pick out custom enums from your project. Hope it might help.
Custom Field Type Umbraco Forms
Hello Umbraco gurus,
I'm working with Umbraco Forms on Umbraco7 . I want to create a custom field type that is a dropdown but has some additional value set to the options. e.g I want to add the following prevales
Red Blue Green Black
But I want to be able to assign a number to each prevalue e.g
Red 10 Blue 100 Green 99 Black 123
So when that option is selected in the form in the front end - I can retrieve this value and do something with it...
Any ideas - i'm stuck!!?
Cheers
Hi James,
it's pretty easy to add your own custom field types to Umbraco. They even wrote some documentation on it: https://our.umbraco.org/documentation/Add-ons/UmbracoForms/Developer/Extending/Adding-a-Fieldtype.
For some inspiration you could take a look at a package we've created with several new datatypes; https://our.umbraco.org/projects/backoffice-extensions/umbraco-forms-on-perplex-steroids/. And the sourcecode is on Github, so you could look over there too; https://github.com/PerplexInternetmarketing/Perplex-Umbraco-Forms
If you get stuck, just let me know, and otherwise 'Good luck, making wonderful forms' :)
Jeffrey
Hi James,
I'm trying to a apply a custom radio button list field type to my form but I'm not sure where I can get the code to have the Prevalues input field added (see screenshot below for reference). I looked at the perplex steroids package but couldn't find a custom radio button list. I would greatly appreciate if you could help me out with this or point me in the right direction. Here is the link to my original post, https://our.umbraco.com/forum/umbraco-forms/94001-radio-button-list-html-file-locationpath
Thank you.
Elin
Hi John, Jeffrey,
Did you manage to do that ? I'm trying to do something similar with prevalues.
Jeffrey, I'm sorry but I can't find any information on custom prevalues field ? I want to create a multiple choice with a specific value for each entry.
I can't find any help for that ?
Thanks,
Florent
Hi Florent,
I was linking to the documentation about creating your own fields. You'll still need to some coding, but I think the documentation is a good start. And if you want to see some examples of how we've implemented it, you could see that in our package.
Jeffrey
Hi Jeffrey,
Thanks but none of those examples are with prevalues, we want the user to setup the values of the choices and add a score per entry (could be the id) but that doesn't seem to be possible ?
F.
Does it need to be a custom field? You can create custom pre-values via the interface itself without any coding - see https://our.umbraco.org/documentation/Add-ons/UmbracoForms/Editor/Defining-and-Attaching-Prevaluesources/
hi John did you find a solution for this? would be create if you could let me know how you did it - got exactly the same requirement! thanks Andrew
any ideas would be appreciated.
Hi Andrew,
Just wanted to check if you found a solution to this as I see no one responded to your original question ?
Hey John, You can create Enums in your project and use them as a pre values for the custom dropdown list property in the umbraco back office. "Nu Pickers" library is the one which will help you out to pick out custom enums from your project. Hope it might help.
Thanks,
is working on a reply...