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 3325 posts 11170 karma points MVP 5x admin c-trib
    Aug 19, 2011 @ 11:27
    Dave Woestenborghs
    0

    Cannot get value from fieldpicker setting

    I have created a custom fieldtype with a fieldpicker settting

     [Setting("Depends on field", description = "Choose the field on which this field depends",
                control = "Umbraco.Forms.Core.FieldSetting.FieldPicker")]
            public string DependantFields { get; set; }

    When I try to get the value through the API it is always empty despite I have chosen a field in the backend. Contour version is 1.1.4.1

     string setting = settingsStorage.GetSetting(new Guid(fieldid), "DependantFields");

  • Tim Geyssens 6562 posts 15373 karma points MVP 2x c-trib
    Aug 19, 2011 @ 11:30
    Tim Geyssens
    0

    And is the value saved?

  • Dave Woestenborghs 3325 posts 11170 karma points MVP 5x admin c-trib
    Aug 19, 2011 @ 11:36
    Dave Woestenborghs
    0

    Hi Tim,

    Yes it is. If i go back in the form designer I see my saved selection.

     

     

  • Dave Woestenborghs 3325 posts 11170 karma points MVP 5x admin c-trib
    Aug 19, 2011 @ 11:38
    Dave Woestenborghs
    0

    I have created a extra setting to test. It's just a dropdown with some prevalues. I can get the value of that setting through the API. So it's related to the fieldpicker.

     

    Dave

  • Tim Geyssens 6562 posts 15373 karma points MVP 2x c-trib
    Aug 19, 2011 @ 11:39
    Tim Geyssens
    0

    Guid must be something else then the fieldid then, you can check the UFSettings table to see what the guid is

  • Dave Woestenborghs 3325 posts 11170 karma points MVP 5x admin c-trib
    Aug 19, 2011 @ 11:49
    Dave Woestenborghs
    0

    Hi Tim,

    Guid in the table was the guid passed into the function. A upgrade to the latest version of contour solved the problem.

    Thx for the help !

  • Tim Geyssens 6562 posts 15373 karma points MVP 2x c-trib
    Aug 19, 2011 @ 11:52
    Tim Geyssens
    0

    That's strange but glad it's sorted

  • 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