Copied to clipboard

Flag this post as spam?

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


  • Chris Lord 58 posts 211 karma points
    Dec 21, 2015 @ 16:15
    Chris Lord
    1

    Umbraco Forms - Checkbox List Limit

    I have created a form that contains a checkbox list with 15+ options. Is there a way to limit the user to select only 5, this is obviously not out of the box functionality and I could probably do this with jQuery or something, but don't really know my way around Forms yet to know where I would add some custom code?

    Cheers

    Chris

  • Matthew Kirschner 323 posts 611 karma points
    Mar 03, 2016 @ 18:11
    Matthew Kirschner
    1

    I'm interested in this as well.

  • Dennis Adolfi 1082 posts 6450 karma points MVP 6x c-trib
    Mar 04, 2016 @ 07:46
    Dennis Adolfi
    0

    Hi Chris and Matthew.

    As mentioned, you could probobly fix this quite easily with jQuery. You can find the view for adding custom code here:

    /Views/Partials/Forms/Fieldtypes/FileType.CheckBoxList.cshtml
    

    If you have the time and energy, i recommend you to build your own Custom Field type instead of mixing with the existing one.

    Adding a field type to Umbraco Forms:

    https://our.umbraco.org/Documentation/Products/UmbracoForms/Developer/Extending/Adding-a-Fieldtype

    Also here is a great tutorial:

    http://denisemdb.com/learn/umbraco-forms-custom-fieldtype/

  • Dennis Adolfi 1082 posts 6450 karma points MVP 6x c-trib
    Mar 04, 2016 @ 07:50
  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies