diff --git a/packages/client/manifest.json b/packages/client/manifest.json index 393c08a282..0feac0ee80 100644 --- a/packages/client/manifest.json +++ b/packages/client/manifest.json @@ -3096,7 +3096,6 @@ "name": "Text Field", "icon": "Text", "styles": ["size"], - "requiredAncestors": ["form"], "editable": true, "size": { "width": 400, @@ -3226,7 +3225,17 @@ } ] } - ] + ], + "context": { + "type": "static", + "values": [ + { + "label": "Value", + "key": "value", + "type": "string" + } + ] + } }, "numberfield": { "name": "Number Field", @@ -3506,7 +3515,6 @@ "name": "Options Picker", "icon": "Menu", "styles": ["size"], - "requiredAncestors": ["form"], "editable": true, "size": { "width": 400, @@ -3714,7 +3722,17 @@ } ] } - ] + ], + "context": { + "type": "static", + "values": [ + { + "label": "Value", + "key": "value", + "type": "string" + } + ] + } }, "multifieldselect": { "name": "Multi-select Picker", diff --git a/packages/client/src/components/app/forms/Field.svelte b/packages/client/src/components/app/forms/Field.svelte index 9210b6ea8f..846bfa6eef 100644 --- a/packages/client/src/components/app/forms/Field.svelte +++ b/packages/client/src/components/app/forms/Field.svelte @@ -2,6 +2,9 @@ import Placeholder from "../Placeholder.svelte" import { getContext, onDestroy } from "svelte" import { Icon } from "@budibase/bbui" + import InnerForm from "./InnerForm.svelte" + import { writable } from "svelte/store" + import Provider from "components/context/Provider.svelte" export let label export let field @@ -71,52 +74,66 @@ }) -
- {#key $component.editing} - - {/key} -
- {#if !formContext} - - {:else if !fieldState} - - {:else if schemaType && schemaType !== type && !["options", "longform"].includes(type)} - - {:else} - - {#if fieldState.error} -
- - {fieldState.error} -
- {:else if helpText} -
- {helpText} -
+ + + + + +{:else} +
+ {#key $component.editing} + + {/key} +
+ {#if !fieldState} + + {:else if schemaType && schemaType !== type && !["options", "longform"].includes(type)} + + {:else} + + {#if fieldState.error} +
+ + {fieldState.error} +
+ {:else if helpText} +
+ {helpText} +
+ {/if} {/if} - {/if} +
-
+{/if}