Here's the relevant part of the code that uses the ID to get the ConfiguredFormInfo instance:
// Variables.
var id = deserialized.id.Value 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.
Macro Parameter and Form Render
Hi,
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.
Perhaps the property value converter can serve as inspiration: https://github.com/rhythmagency/formulate/blob/3004d968b4cc67f9663f6567c0babe9a08a7d41d/src/formulate.app/Converters/ConfiguredFormConverter.cs
Here's the relevant part of the code that uses the ID to get the
ConfiguredFormInfo
instance:It uses the
IConfiguredFormPersistence
instance to fetch details about the configured form, the creates a new instances ofConfiguredFormInfo
based on those details.is working on a reply...