Copied to clipboard

Flag this post as spam?

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

  • SinkyPars 132 posts 175 karma points
    Jun 19, 2020 @ 14:28

    Macro Parameter and Form Render


    I'm passing in a form Id as a macro parameter.

    I'm struggling to find anywhere in V3 where I can get the ConfiguredFormInfo by Id in order to render the form.

    Any help is much appreciated.

  • Nicholas Westby 2054 posts 7100 karma points c-trib
    Jun 19, 2020 @ 16:03
    Nicholas Westby

    Perhaps the property value converter can serve as inspiration:

    Here's the relevant part of the code that uses the ID to get the ConfiguredFormInfo instance:

    // Variables.
    var id = as string;
    var guid = string.IsNullOrWhiteSpace(id)
        ? null
        : GuidHelper.GetGuid(id) as Guid?;
    var conForm = guid.HasValue
        ? ConfiguredForms.Retrieve(guid.Value)
        : null;
    // Return configuration.
    return new ConfiguredFormInfo()
        Configuration = conForm?.Path[conForm.Path.Length - 1],
        FormId = conForm?.Path[conForm.Path.Length - 2],
        LayoutId = conForm?.LayoutId,
        TemplateId = conForm?.TemplateId

    It uses the IConfiguredFormPersistence instance to fetch details about the configured form, the creates a new instances of ConfiguredFormInfo based on those details.

Please Sign in or register to post replies

Write your reply to: