Copied to clipboard

Flag this post as spam?

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


  • Bogdan 250 posts 427 karma points
    Jan 24, 2014 @ 11:26
    Bogdan
    0

    Pre-values missing from PageStorage.GetAllPages

    Hello,

    The result from PageStorage.GetAllPages has no values in FieldSets.Fields.PreValues. Any idea what can be done?

    Thanks!

  • Comment author was deleted

    Jan 24, 2014 @ 11:40

    Hmm that's strange, will check what's going on, and you are sure your fields have prevalues?

  • Bogdan 250 posts 427 karma points
    Jan 24, 2014 @ 11:46
    Bogdan
    0

    Yes, I'm sure, I can get them fine with field.PreValueSource.Type.GetPreValues(field). But as I'm building the forms from an ajax request, I'd like to get everything in one request, making a separate request for each dropdown for example would delay the rendering of the form too much.

  • Bogdan 250 posts 427 karma points
    Jan 24, 2014 @ 12:05
    Bogdan
    0

    I made some print screens to better show what I'm trying to do.

    PreValues GetAllPages

  • Comment author was deleted

    Jan 24, 2014 @ 12:09

    Could you try using the form model instead (in Umbraco.Forms.Mvc namespace)

    var model = new Models.FormViewModel { FormId = form.Id, FormStep = formStep };

                model.Build();
    

    and return that

  • Bogdan 250 posts 427 karma points
    Jan 24, 2014 @ 12:40
    Bogdan
    0

    Great, the FormViewModel has the prevalues populated correctly!

    Thanks Tim!

  • Comment author was deleted

    Jan 24, 2014 @ 12:45

    Awesome :)

  • 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