Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • John French 32 posts 83 karma points
    Jun 27, 2017 @ 10:59
    John French
    0

    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

  • [email protected] 406 posts 2135 karma points MVP 7x c-trib
    Jun 28, 2017 @ 05:58
    jeffrey@umarketingsuite.com
    0

    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

  • Elin 45 posts 166 karma points
    Oct 03, 2018 @ 13:55
    Elin
    0

    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

    Radio Button Screenshot

  • MrFlo 159 posts 403 karma points
    Oct 30, 2017 @ 15:18
    MrFlo
    0

    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

  • [email protected] 406 posts 2135 karma points MVP 7x c-trib
    Oct 31, 2017 @ 07:19
    jeffrey@umarketingsuite.com
    0

    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

  • MrFlo 159 posts 403 karma points
    Oct 31, 2017 @ 09:09
    MrFlo
    0

    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.

  • Dan Diplo 1554 posts 6205 karma points MVP 5x c-trib
    Oct 31, 2017 @ 12:28
    Dan Diplo
    0

    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/

  • andrew shearer 506 posts 653 karma points
    Mar 06, 2018 @ 23:08
    andrew shearer
    0

    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

  • andrew shearer 506 posts 653 karma points
    Mar 14, 2018 @ 22:18
    andrew shearer
    0

    any ideas would be appreciated.

  • Elin 45 posts 166 karma points
    Oct 03, 2018 @ 13:58
    Elin
    0

    Hi Andrew,

    Just wanted to check if you found a solution to this as I see no one responded to your original question ?

  • Umair Javed 1 post 21 karma points
    Jan 11, 2021 @ 11:13
    Umair Javed
    0

    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,

Please Sign in or register to post replies

Write your reply to:

Draft