File tree Expand file tree Collapse file tree
DfE.ExternalApplications.Domain/Models
DfE.ExternalApplications.Web Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -54,4 +54,12 @@ All notable changes to this service will be documented in this file.
5454
5555## [ 1.2.10]
5656### Notes
57- - Added support custom application names per tenant.
57+ - Added support custom application names per tenant.
58+
59+ ## [ 1.2.11]
60+ ### Notes
61+ - Added max-words property to character count field.
62+
63+ ## [ 1.2.12]
64+ ### Notes
65+ - Added root level template property "hideFieldLabelWhenOnlyOneField" to toggle labels hiding for single field pages.
Original file line number Diff line number Diff line change @@ -32,5 +32,8 @@ public class FormTemplate
3232 /// </summary>
3333 [ JsonPropertyName ( "defaultFieldRequirementPolicy" ) ]
3434 public string ? DefaultFieldRequirementPolicy { get ; set ; }
35+
36+ [ JsonPropertyName ( "hideFieldLabelWhenOnlyOneField" ) ]
37+ public bool HideFieldLabelWhenOnlyOneField { get ; set ; } = true ; // Default to true for backward compatibility
3538 }
3639}
Original file line number Diff line number Diff line change 55 <Nullable >enable</Nullable >
66 <ImplicitUsings >enable</ImplicitUsings >
77 <UserSecretsId >8051c984-585b-4a5e-b6d7-833e5dd4afe7</UserSecretsId >
8- <Version >1.2.10 </Version >
9- <InformationalVersion >1.2.10 </InformationalVersion >
8+ <Version >1.2.12 </Version >
9+ <InformationalVersion >1.2.12 </InformationalVersion >
1010 <IncludeSourceRevisionInInformationalVersion >false</IncludeSourceRevisionInInformationalVersion >
1111 </PropertyGroup >
1212
Original file line number Diff line number Diff line change 1717 .FieldType .Equals (" upload" , StringComparison .OrdinalIgnoreCase ));
1818
1919 string typeOfFirstField = Model .CurrentPage .Fields [0 ].Type ;
20- bool labelledByHeader = (Model .CurrentPage .Fields .Count == 1 ) && typeOfFirstField != " complexField" ;
20+ bool hideFieldLabel = Model .Template .HideFieldLabelWhenOnlyOneField
21+ && Model .CurrentPage .Fields .Count == 1
22+ && typeOfFirstField != " complexField" ;
23+
2124 bool hasAutocompleteField = Model .CurrentPage .Fields .Any (f =>
2225 f .Type == " complexField" &&
2326 f .ComplexField != null &&
130133 var fieldModelState = ViewData .ModelState .Where (f => f .Key == field .FieldId ).FirstOrDefault ();
131134 var errorMessage = fieldModelState .Value ? .Errors ? .FirstOrDefault ()? .ErrorMessage ?? String .Empty ;
132135
133- if (labelledByHeader )
136+ if (hideFieldLabel )
134137 {
135138 field .Label .IsVisible = false ;
136139 }
You can’t perform that action at this time.
0 commit comments