Skip to content

Commit

Permalink
Merge branch 'master' into ON-41616
Browse files Browse the repository at this point in the history
  • Loading branch information
mymattcarroll authored Jul 2, 2024
2 parents 1f7f3b1 + 774e3f1 commit 10f9cac
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@

- form submissions and draft downloads to use storage endpoints

### Added

- `canCollapseFromBottom` to `FormElement`

## [6.2.1] - 2024-07-01

### Added
Expand Down
9 changes: 8 additions & 1 deletion OneBlink.SDK/models/FormElement.cs
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,11 @@ public string formattedAddressElementId
{
get; set;
}

public bool? canCollapseFromBottom
{
get; set;
}
private static Guid initialiseId(Guid? id)
{
if (!id.HasValue)
Expand Down Expand Up @@ -786,7 +791,8 @@ public static FormElement CreateSectionElement(
bool isCollapsed = false,
List<FormElement> elements = null,
List<string> customCssClasses = null,
string meta = null
string meta = null,
bool canCollapseFromBottom = true
)
{
FormElement sectionElement = new FormElement();
Expand All @@ -801,6 +807,7 @@ public static FormElement CreateSectionElement(
sectionElement.elements = elements;
sectionElement.customCssClasses = customCssClasses;
sectionElement.meta = meta;
sectionElement.canCollapseFromBottom = canCollapseFromBottom;
return sectionElement;
}

Expand Down
4 changes: 3 additions & 1 deletion docs/models/FormElement.md
Original file line number Diff line number Diff line change
Expand Up @@ -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<ConditionallyShowPredicate>` | 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 |
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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<FormElement>` | `null` |
| `canCollapseFromBottom` | No | `bool?` | `true` |

##### Example

Expand Down

0 comments on commit 10f9cac

Please sign in to comment.