From 1afb2a14bb18e9d1761e53e20bfa079ac4f7de7c Mon Sep 17 00:00:00 2001 From: Jithin P V Date: Fri, 17 Oct 2025 01:19:42 +0530 Subject: [PATCH 1/3] added a DTO for internal exception helper --- Objects/Dtos/SerializableExceptionDto.cs | 49 ++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 Objects/Dtos/SerializableExceptionDto.cs diff --git a/Objects/Dtos/SerializableExceptionDto.cs b/Objects/Dtos/SerializableExceptionDto.cs new file mode 100644 index 00000000..9f9d1042 --- /dev/null +++ b/Objects/Dtos/SerializableExceptionDto.cs @@ -0,0 +1,49 @@ +using System; +using System.Collections.Generic; + +namespace ExpressBase.Common.Helpers +{ + + [Serializable] + public class SerializableExceptionDto + { + public string Type { get; set; } + public string Message { get; set; } + public string StackTrace { get; set; } + public string Source { get; set; } + public string TargetSite { get; set; } + public Dictionary Data { get; set; } + public SerializableExceptionDto InnerException { get; set; } + + public static SerializableExceptionDto FromException(Exception ex) + { + if (ex == null) return null; + + var dto = new SerializableExceptionDto + { + Type = ex.GetType().FullName, + Message = ex.Message, + StackTrace = ex.StackTrace, + Source = ex.Source, + TargetSite = ex.TargetSite?.ToString(), + Data = new Dictionary() + }; + + foreach (var key in ex.Data.Keys) + { + if (key != null) + dto.Data[key.ToString()] = ex.Data[key]?.ToString(); + } + + if (ex.InnerException != null) + dto.InnerException = FromException(ex.InnerException); + + return dto; + } + + public override string ToString() + { + return $"{Type}: {Message}\n{StackTrace}"; + } + } +} From 2a9fb664f3a26e267d59a124ec6149280183767e Mon Sep 17 00:00:00 2001 From: Jithin P V Date: Fri, 17 Oct 2025 01:19:54 +0530 Subject: [PATCH 2/3] added PublicFormV2QueryParamsDto --- Objects/Dtos/PublicFormV2QueryParamsDto.cs | 38 ++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 Objects/Dtos/PublicFormV2QueryParamsDto.cs diff --git a/Objects/Dtos/PublicFormV2QueryParamsDto.cs b/Objects/Dtos/PublicFormV2QueryParamsDto.cs new file mode 100644 index 00000000..65af4de5 --- /dev/null +++ b/Objects/Dtos/PublicFormV2QueryParamsDto.cs @@ -0,0 +1,38 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace ExpressBase.Objects.Dtos +{ + public class PublicFormV2QueryParamsDto + { + public string PublicFormRefId { get; set; } + public string SourceFormRefId { get; set; } + public int FormDataId { get; set; } + public string TimeZone { get; set; } + public string UserIp { get; set; } + public List PrefillParams { get; set; } = new List(); + + } + + public class PrefillParam + { + public string Name { get; set; } + public PrefillParamType Type { get; set; } + public string Value { get; set; } + } + + public enum PrefillParamType + { + text, + number, + date, + email, + phone, + hidden, + checkbox, + radio, + select, + textarea + } +} From 87ea1168a20c0692a20a49298e8968ba25638143 Mon Sep 17 00:00:00 2001 From: Jithin P V Date: Fri, 17 Oct 2025 01:20:10 +0530 Subject: [PATCH 3/3] added a new prop. to WebForm --- ObjectContainers/EbWebForm.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ObjectContainers/EbWebForm.cs b/ObjectContainers/EbWebForm.cs index 23cf05b1..375ffbfb 100644 --- a/ObjectContainers/EbWebForm.cs +++ b/ObjectContainers/EbWebForm.cs @@ -364,6 +364,12 @@ public EbWebForm() [DefaultPropValue("true")] public bool CancelReason { get; set; } + [PropertyGroup(PGConstants.CORE)] + [EnableInBuilder(BuilderType.WebForm)] + [Alias("Public Access")] + [HelpText("Enable public access to this form.")] + public bool IsPublicForm { get; set; } + [PropertyGroup(PGConstants.EXTENDED)] [EnableInBuilder(BuilderType.WebForm)] public string EditReasonCtrl { get; set; }