Copied to clipboard

Flag this post as spam?

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


  • Dave Woestenborghs 3504 posts 12135 karma points MVP 9x admin c-trib
    Jan 09, 2013 @ 12:17
    Dave Woestenborghs
    0

    Preview not working after upgrade to 3.0.5 for custom fieldtypes

    I have some custom fieldtypes in my contour solution. After a upgrade to version 3.0.5 my preview of the forms is not working anymore. I get this error

     

    The partial view '/umbraco/plugins/umbracoContour/Views/Fieldtype.datepickerwithcontextdefaultvalue.cshtml' was not found or no view engine supports the searched locations. The following locations were searched: /umbraco/plugins/umbracoContour/Views/Fieldtype.datepickerwithcontextdefaultvalue.cshtml

     

    I noticed the previewpage has changed to previewFormDialogMvc.aspx

    How can I get the old preview back

     

     

     

     

     

  • Comment author was deleted

    Jan 09, 2013 @ 12:24

    If you update the page \Umbraco\plugins\umbracoContour\editForm.aspx look for previewFormDialogMvc.aspx and change to previewFormDialog.aspx

    I'll make this a config setting in the next release 

    Cheers,
    Tim 

  • Dave Woestenborghs 3504 posts 12135 karma points MVP 9x admin c-trib
    Jan 09, 2013 @ 12:35
    Dave Woestenborghs
    0

    That worked, but introduced another issue. My conditions are not working now when I am in preview mode.

  • Dave Woestenborghs 3504 posts 12135 karma points MVP 9x admin c-trib
    Jan 09, 2013 @ 12:38
    Dave Woestenborghs
    0

    And with some further checking forms added by the usercontrol macro in a page don't have the conditions working either

  • Comment author was deleted

    Jan 09, 2013 @ 12:47

    Usercontrol macro doesn't support conditions :( it's one of the advantages of moving to mvc and razor , usercontrol one will be deprecated

  • Dave Woestenborghs 3504 posts 12135 karma points MVP 9x admin c-trib
    Jan 09, 2013 @ 13:31
    Dave Woestenborghs
    0

    What needs to be done to make my custom fieldtypes work with razor ? Is there some documentation somewhere ?

     

    Dave

  • Comment author was deleted

    Jan 09, 2013 @ 13:35

    You need to provide a view for it, look at  the existing ones at \Umbraco\plugins\umbracoContour\Views\FieldType.*

  • Dave Woestenborghs 3504 posts 12135 karma points MVP 9x admin c-trib
    Jan 09, 2013 @ 13:36
    Dave Woestenborghs
    0

    I'm look at it ? What is properties do I have on the @Model

  • Comment author was deleted

    Jan 09, 2013 @ 13:41

    public string Id { get; set; }

            public string Name { get; set; }

            public string Caption { get; set; }

            public bool Mandatory { get; set; }

            public string RequiredErrorMessage { get; set; }

            public bool Validate { get; set; }

            public string Regex { get; set; }

            public string InvalidErrorMessage { get; set; }

            public string FieldTypeName { get; set; }

            public bool HideLabel { get; set; }

            public bool ShowIndicator { get; set; }

            public string ToolTip { get; set; }

            public string CssClass { get; set; }

     

            public List<Object> RecordValues { get; set; }

     

            public List<PrevalueViewModel> PreValues { get; set; }

     

            public List<FieldSettingViewModel> AdditionalSettings { get; set; }

     

            public bool HasCondition { get; set; }

            public FieldConditionActionType ConditionActionType { get; set; }

            public FieldConditionLogicType ConditionLogicType { get; set; }

            public List<FieldConditionRule> ConditionRules { get; set; }

     

            public string Value { get; }

  • Dave Woestenborghs 3504 posts 12135 karma points MVP 9x admin c-trib
    Jan 09, 2013 @ 14:27
    Dave Woestenborghs
    0

    How do I access my custom properties of my fieldtype ?

  • Comment author was deleted

    Jan 09, 2013 @ 14:28

    Those are in public List<FieldSettingViewModel> AdditionalSettings { get; set; }

  • Dave Woestenborghs 3504 posts 12135 karma points MVP 9x admin c-trib
    Jan 09, 2013 @ 14:33
    Dave Woestenborghs
    0

    Tim is this stuff documented somewhere ? So don't need to post a question everytime I need something ?

  • Comment author was deleted

    Jan 09, 2013 @ 14:34

    Not yet docs will be available in 1/2 weeks

  • Dave Woestenborghs 3504 posts 12135 karma points MVP 9x admin c-trib
    Jan 29, 2013 @ 12:24
    Dave Woestenborghs
    0

    Hi Tim,

    Are the docs ready yet ?

  • Comment author was deleted

    Jan 29, 2013 @ 12:28
  • Comment author was deleted

    Jan 29, 2013 @ 12:57
  • Comment author was deleted

    Jan 29, 2013 @ 13:20
Please Sign in or register to post replies

Write your reply to:

Draft