diff --git a/CHANGELOG.md b/CHANGELOG.md index 4c2a019..d1bcf3d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## Unreleased +### Added + +- `canCollapseFromBottom` to `FormElement` + ## [6.2.1] - 2024-07-01 ### Added diff --git a/OneBlink.SDK/models/FormElement.cs b/OneBlink.SDK/models/FormElement.cs index 3863178..33fd74b 100644 --- a/OneBlink.SDK/models/FormElement.cs +++ b/OneBlink.SDK/models/FormElement.cs @@ -437,6 +437,11 @@ public string formattedAddressElementId { get; set; } + + public bool? canCollapseFromBottom + { + get; set; + } private static Guid initialiseId(Guid? id) { if (!id.HasValue) @@ -786,7 +791,8 @@ public static FormElement CreateSectionElement( bool isCollapsed = false, List elements = null, List customCssClasses = null, - string meta = null + string meta = null, + bool canCollapseFromBottom = true ) { FormElement sectionElement = new FormElement(); @@ -801,6 +807,7 @@ public static FormElement CreateSectionElement( sectionElement.elements = elements; sectionElement.customCssClasses = customCssClasses; sectionElement.meta = meta; + sectionElement.canCollapseFromBottom = canCollapseFromBottom; return sectionElement; } diff --git a/docs/models/FormElement.md b/docs/models/FormElement.md index 4c0b815..0a0f4da 100644 --- a/docs/models/FormElement.md +++ b/docs/models/FormElement.md @@ -20,7 +20,7 @@ Only a default constructor is provided, instead it is recommended to create a Fo | `readOnly` | No | `Boolean?` | Whether the user can modify the elements value | false | | `conditionallyShowPredicates` | No | `List` | List of elements to be used as conditions | null | | `defaultValue` | No | `dynamic` | The default value for this element | null | -| `defaultValueDaysOffset` | No | `long? | The number of days to offset the default value for date and datetime elements | null | +| `defaultValueDaysOffset` | No | `long?` | The number of days to offset the default value for date and datetime elements | null | | `buttons` | No | `Boolean?` | Determines if this element is shown as buttons (applies to Radio buttons and checkboxes) | false | | `multi` | No | `Boolean?` | Whether the element is a single or multiple selection (applies to select elements) | false | | `isSlider` | No | `Boolean?` | Whether this element is shown as a slider (applies to number elements) | false | @@ -107,6 +107,7 @@ Only a default constructor is provided, instead it is recommended to create a Fo | `decorativeImage` | No | `bool?` | Whether the image element is decorative or not for screen readers. | | | `showStreetAddress` | No | `bool?` | Whether the location element will pre-fill an element with a formatted address based on chosen location. | | | `formattedAddressElementId` | No | `string` | The element ID of the element that will be pre-filled with a formatted address after selecting a location with a location element. This can only be used for Geoscape elements with the Geoscape Integrations. | | +| `canCollapseFromBottom` | No | `bool?` | Whether the section element can be collapsed from the bottom of the section. | `false` | ### Static Functions @@ -372,6 +373,7 @@ Creates a new FormElement defined as a Section element, including all parameters | `hint` | No | `string` | `null` | | `isCollapsed` | No | `bool` | `false` | | `elements` | No | `List` | `null` | +| `canCollapseFromBottom` | No | `bool?` | `true` | ##### Example