Copied to clipboard

Flag this post as spam?

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


  • Greg Woods 12 posts 92 karma points
    Jul 19, 2018 @ 06:19
    Greg Woods
    0

    Ability to call FormPrePopulate event mid form

    As per this update: http://issues.umbraco.org/issue/CON-1409

    We have been playing around with this event (UmbracoFormsController_FormPrePopulate) and it works well for new forms.

    However if we try to get data from an api in an answer type on one form section then move to the next.

    The event is triggered and the values are set however they don't appear in the form fields.

    So with this:

            if (nameField != null)
        {
            //Set the value to be pre-filled as 'Greg'
            nameField.Values = new List<object>() { "Greg" };
        } // putting breakpoint here the value is Greg
    

    However when viewing the forms once rendered the value isn't shown.

    Has anyone used this event mid form?

Please Sign in or register to post replies

Write your reply to:

Draft