diff --git a/OneBlink.SDK.Tests/FormsClientTests.cs b/OneBlink.SDK.Tests/FormsClientTests.cs index c0bfb59..152a020 100644 --- a/OneBlink.SDK.Tests/FormsClientTests.cs +++ b/OneBlink.SDK.Tests/FormsClientTests.cs @@ -247,19 +247,6 @@ public async void can_crud_form() null ); - FormElement geoscapeElement = FormElement.CreateGeoscapeAddressElement( - "geoscapeElement", - "Geoscape Element", - Guid.NewGuid(), - false, - false, - null, - true, - false, - "default", - "placeholder value", - "hint value" - ); FormElementOption option = new FormElementOption(); option.id = Guid.NewGuid().ToString(); option.value = "A"; @@ -270,7 +257,7 @@ public async void can_crud_form() new List() { option } ); - newForm.elements = new List() { textElement, summaryElement, geoscapeElement, complianceElement }; + newForm.elements = new List() { textElement, summaryElement, complianceElement }; FormsClient formsClient = new FormsClient(ACCESS_KEY, SECRET_KEY, TenantName.ONEBLINK_TEST); Form savedForm = await formsClient.Create(newForm); diff --git a/OneBlink.SDK/models/Form.cs b/OneBlink.SDK/models/Form.cs index 6dabe98..a2cffd9 100644 --- a/OneBlink.SDK/models/Form.cs +++ b/OneBlink.SDK/models/Form.cs @@ -280,5 +280,10 @@ public List customCssClasses { get; set; } + + public string googleMapsIntegrationEnvironmentId + { + get; set; + } } } \ No newline at end of file diff --git a/OneBlink.SDK/models/FormElement.cs b/OneBlink.SDK/models/FormElement.cs index 7163556..3863178 100644 --- a/OneBlink.SDK/models/FormElement.cs +++ b/OneBlink.SDK/models/FormElement.cs @@ -428,6 +428,15 @@ public bool? decorativeImage { get; set; } + public bool? showStreetAddress + { + get; set; + } + + public string formattedAddressElementId + { + get; set; + } private static Guid initialiseId(Guid? id) { if (!id.HasValue) diff --git a/OneBlink.SDK/models/FormMigrationOptions.cs b/OneBlink.SDK/models/FormMigrationOptions.cs index a066e5e..e3f1df3 100644 --- a/OneBlink.SDK/models/FormMigrationOptions.cs +++ b/OneBlink.SDK/models/FormMigrationOptions.cs @@ -46,5 +46,9 @@ public long? versionId { get; set; } + public bool googleMapsIntegrationEnvironmentId + { + get; set; + } } } \ No newline at end of file diff --git a/OneBlink.SDK/models/FormsAppEnvironmentCloneOptions.cs b/OneBlink.SDK/models/FormsAppEnvironmentCloneOptions.cs index f9f636b..696fc24 100644 --- a/OneBlink.SDK/models/FormsAppEnvironmentCloneOptions.cs +++ b/OneBlink.SDK/models/FormsAppEnvironmentCloneOptions.cs @@ -38,5 +38,9 @@ public bool isCloningFormApprovalSteps { get; set; } + public bool isCloningFormGoogleMapsIntegrationEnvironmentId + { + get; set; + } } } \ No newline at end of file diff --git a/docs/models/Form.md b/docs/models/Form.md index fe0c6b3..f8e171e 100644 --- a/docs/models/Form.md +++ b/docs/models/Form.md @@ -4,37 +4,38 @@ ### Constructor -| Parameter | Required | Type | Description | Default Value | -| ------------------------------ | -------- | --------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------- | -| `name` | Yes | `string` | | | -| `description` | Yes | `string` | | | -| `organisationId` | Yes | `string` | Id of the organisation this form is associated too | | -| `formsAppEnvironmentId` | Yes | `long` | Id of the environment this form is part of | | -| `formsAppIds` | No | `List` | List of Form Apps id's | `new List()` | -| `elements` | No | `List` | List of FormElement's | `new List()` | -| `id` | No | `long?` | Will be assigned by OneBlink when form is creating | `null` | -| `postSubmissionAction` | No | `string` | Allowed values of "BACK", "URL", "CLOSE", "FORMS_LIBRARY" | `"FORMS_LIBRARY"` | -| `isAuthenticated` | No | `bool` | Determines if only authenticated users can access the form | `true` | -| `submissionEvents` | No | `List` | List of Form submission events | `new List()` | -| `draftEvents` | No | `List` | List of Form draft events | `new List()` | -| `schedulingEvents` | No | `List` | List of Form scheduling events | `new List()` | -| `approvalSteps` | No | `List` | List of Form approval steps | `new List()` | -| `approvalEvents` | No | `List` | List of Form approval events | `new List()` | -| `isMultiPage` | No | `bool` | Determines if this form a single page form or multi page form | `false` | -| `redirectUrl` | No | `string` | URL to be redirected too, only applies if `postSubmissionAction` is "URL" | `null` | -| `tags` | No | `List` | List of tags to be associated with the form | `new List()` | -| `publishStartDate` | No | `DateTime?` | DateTime the form should become available | `null` | -| `publishEndDate` | No | `DateTime?` | DateTime the form should become unavailable | `null` | -| `unpublishedUserMessage` | No | `string` | The message to be shown to forms users when the form is not in the published time window | `null` | -| `cancelAction` | No | `string` | Allowed values of "BACK", "URL", "CLOSE", "FORMS_LIBRARY" | `"BACK"` | -| `cancelRedirectUrl` | No | `string` | URL to be redirected too, only applies if `cancelAction` is "URL" | `null` | -| `serverValidation` | No | `FormServerValidation` | Optional configuration for form submission validation | `null` | -| `externalIdGenerationOnSubmit` | No | `FormExternalIdGeneration` | Optional configuration for generating externalId after serverValidation but before submission | `null` | -| `personalisation` | No | `FormPersonalisation` | Optional configuration for prefilling elements or generating new elements on form load | `null` | -| `approvalConfiguration` | No | `FormApprovalConfiguration` | Optional configuration for approvals | `null` | -| `submissionTitle` | No | `string` | Optional configuration for the default submission title | `null` | -| `continueWithAutosave` | No | `boolean` | Whether or not viewing the form should auto-continue with autosave data when available rather than prompting the user title | `false` | -| `customCssClasses` | No | `List` | Custom CSS classes that will be added to the form during rendering | `new List()` | +| Parameter | Required | Type | Description | Default Value | +| ------------------------------------ | -------- | --------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------- | +| `name` | Yes | `string` | | | +| `description` | Yes | `string` | | | +| `organisationId` | Yes | `string` | Id of the organisation this form is associated too | | +| `formsAppEnvironmentId` | Yes | `long` | Id of the environment this form is part of | | +| `formsAppIds` | No | `List` | List of Form Apps id's | `new List()` | +| `elements` | No | `List` | List of FormElement's | `new List()` | +| `id` | No | `long?` | Will be assigned by OneBlink when form is creating | `null` | +| `postSubmissionAction` | No | `string` | Allowed values of "BACK", "URL", "CLOSE", "FORMS_LIBRARY" | `"FORMS_LIBRARY"` | +| `isAuthenticated` | No | `bool` | Determines if only authenticated users can access the form | `true` | +| `submissionEvents` | No | `List` | List of Form submission events | `new List()` | +| `draftEvents` | No | `List` | List of Form draft events | `new List()` | +| `schedulingEvents` | No | `List` | List of Form scheduling events | `new List()` | +| `approvalSteps` | No | `List` | List of Form approval steps | `new List()` | +| `approvalEvents` | No | `List` | List of Form approval events | `new List()` | +| `isMultiPage` | No | `bool` | Determines if this form a single page form or multi page form | `false` | +| `redirectUrl` | No | `string` | URL to be redirected too, only applies if `postSubmissionAction` is "URL" | `null` | +| `tags` | No | `List` | List of tags to be associated with the form | `new List()` | +| `publishStartDate` | No | `DateTime?` | DateTime the form should become available | `null` | +| `publishEndDate` | No | `DateTime?` | DateTime the form should become unavailable | `null` | +| `unpublishedUserMessage` | No | `string` | The message to be shown to forms users when the form is not in the published time window | `null` | +| `cancelAction` | No | `string` | Allowed values of "BACK", "URL", "CLOSE", "FORMS_LIBRARY" | `"BACK"` | +| `cancelRedirectUrl` | No | `string` | URL to be redirected too, only applies if `cancelAction` is "URL" | `null` | +| `serverValidation` | No | `FormServerValidation` | Optional configuration for form submission validation | `null` | +| `externalIdGenerationOnSubmit` | No | `FormExternalIdGeneration` | Optional configuration for generating externalId after serverValidation but before submission | `null` | +| `personalisation` | No | `FormPersonalisation` | Optional configuration for prefilling elements or generating new elements on form load | `null` | +| `approvalConfiguration` | No | `FormApprovalConfiguration` | Optional configuration for approvals | `null` | +| `submissionTitle` | No | `string` | Optional configuration for the default submission title | `null` | +| `continueWithAutosave` | No | `boolean` | Whether or not viewing the form should auto-continue with autosave data when available rather than prompting the user title | `false` | +| `customCssClasses` | No | `List` | Custom CSS classes that will be added to the form during rendering | `new List()` | +| `googleMapsIntegrationEnvironmentId` | No | `string` | Optional configuration to allow "Show Street Address" on "Location" Elements to work with "Text" elements. You must have a Google Maps Integration setup to use this. | `null` | ### Other properties diff --git a/docs/models/FormElement.md b/docs/models/FormElement.md index 2bf22ff..cc3b3d2 100644 --- a/docs/models/FormElement.md +++ b/docs/models/FormElement.md @@ -105,6 +105,8 @@ Only a default constructor is provided, instead it is recommended to create a Fo | `webMapId` | No | `string` | ArcGIS Web map Id. | | | `showLayerPanel` | No | `bool` | Show layer panel to user when rendering ArcGIS web map. | | | `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 a Text element for Google Maps Integrations and Geoscape elements for Geoscape Integrations. | | ### Static Functions