Copied to clipboard

Flag this post as spam?

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


  • Ismail Mayat 4511 posts 10092 karma points MVP 2x admin c-trib
    Jul 14, 2010 @ 12:49
    Ismail Mayat
    0

    Setting not appearing

    Guys,

    I am working on custom fieldtype based on fileupload but i want to be able to set allowed extensions.  So I have created new custom field code is ripped form contour shared source for uploadfield type however in mine as per the documentation page 9 I have added a setting e.g.

            [Umbraco.Forms.Core.Attributes.Setting("Upload extensions",
            description = "Allowed file extensions",
            control = "Umbraco.Forms.Core.FieldSetting.TextField")]
            public string AllowedExtensions { get; set; }

    In contour when i add this type i should see setting Allowed file extensions are am i missing a trick?  The second question is in the fieldtype how do i do the validation and throw up error message? In the documentation it mentions on page 9 overriding ValidateSettings property and doing test there however when you try this you get error saying no property to override not sure if this is specific only to workflow.

    Regards

    Ismail

     

  • Comment author was deleted

    Jul 14, 2010 @ 14:33

    Hi Ismail,

    Currently you can't add additional settings to a field type.

    For the validation you simply need to add the ValidationProperty attribute to your custom webcontrol.

    Cheers,
    Tim

  • Ismail Mayat 4511 posts 10092 karma points MVP 2x admin c-trib
    Jul 14, 2010 @ 15:21
    Ismail Mayat
    0

    Tim,

    Thanks for you reply, gutted about not being able to have additional settings will this be available in future release.  Anyhow I have come up with a work around for this see here 

    Regards

    Ismail

  • Per Ploug 865 posts 3491 karma points MVP admin
    Jul 15, 2010 @ 10:54
    Per Ploug
    1

    Hi Ismail

    It is something we have on the todo for the next major version, there are however some technical challenges we need to overcome before it will be possible, but the initial tests look promising. 

    /per

  • Ismail Mayat 4511 posts 10092 karma points MVP 2x admin c-trib
    Jul 15, 2010 @ 10:59
    Ismail Mayat
    0

    Per,

    Awesome looking forward to it, its a great product I have been having some fun extending it.

    Regards

    Ismail

Please Sign in or register to post replies

Write your reply to:

Draft