Merge pull request #12101 from Budibase/feature/form-block-description

Added description field to the Formblock
This commit is contained in:
Andrew Kingston 2023-10-25 08:53:17 +01:00 committed by GitHub
commit 413f8b1cfd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 67 additions and 42 deletions

View File

@ -5305,6 +5305,12 @@
"key": "title",
"nested": true
},
{
"type": "text",
"label": "Description",
"key": "description",
"nested": true
},
{
"section": true,
"dependsOn": {

View File

@ -12,6 +12,7 @@
export let fields
export let labelPosition
export let title
export let description
export let showDeleteButton
export let showSaveButton
export let saveButtonLabel
@ -98,6 +99,7 @@
fields: fieldsOrDefault,
labelPosition,
title,
description,
saveButtonLabel: saveLabel,
deleteButtonLabel: deleteLabel,
schema,

View File

@ -11,6 +11,7 @@
export let fields
export let labelPosition
export let title
export let description
export let saveButtonLabel
export let deleteButtonLabel
export let schema
@ -157,6 +158,14 @@
}}
>
{#if renderHeader}
<BlockComponent
type="container"
props={{
direction: "column",
gap: "S",
}}
order={0}
>
<BlockComponent
type="container"
props={{
@ -211,6 +220,14 @@
</BlockComponent>
{/if}
</BlockComponent>
{#if description}
<BlockComponent
type="text"
props={{ text: description }}
order={1}
/>
{/if}
</BlockComponent>
{/if}
{#key fields}
<BlockComponent type="fieldgroup" props={{ labelPosition }} order={1}>