Copied to clipboard

Flag this post as spam?

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


  • James Ley 22 karma points
    Jun 29, 2011 @ 01:09
    James Ley
    0

    Custom Field Type errors when set to mandatory

    Hi Guys, hoping you'll be able to help with an issue related to my custom field type I've created. 

    The field type Ive created is based on the CheckBox from the shared source code for contour. In essence it allows the user to create a checkbox that also contains a bulleted list (which is taken from the pre-values). This renders as a checkbox followed by a bulleted list of items, which is used to check that the person filling out the form has read the bulleted items and ticked the checkbox to confirm that they have read the list. This works fine until I try and set the field to mandatory; if I do this I get an error stating that Control 'e994b609_b996_4136_85b0_0b6cf95bdcce' referenced by the ControlToValidate property of 'mandatory' cannot be validated.

    I suspect this is to do with that fact that my control in the class is a simple ASP CheckBox, rather than the ValidateableCheckBox used in the source code. If this is the case then what do I need to reference to use a ValidateableCheckBox rather than a standard CheckBox? Or is there a better way of doing this?

  • James Ley22 karma points
    Jun 29, 2011 @ 12:54
    James Ley
    0

    Ok, I thought I'd sorted this by using the Umbraco.Forms.Core.Controls.ValidateableCheckBox instead, however this does not work either. What am I missing?

Please Sign in or register to post replies

Write your reply to:

Draft
Our.umbraco.org is the community mothership for Umbraco, the open source asp.net cms. With a friendly forum for all your questions, a comprehensive documentation and a ton of packages from the community.