Skip to content

Update value in form on input value change #745

Answered by Hobbitive
Hobbitive asked this question in Help
Discussion options

You must be logged in to vote

Found another solution

You need to add Form.Input with hidden class, so that it will properly set value

<Form.Field {config} name="image" let:setValue>
		<Form.Item>
			<Form.Label>Zdjecie</Form.Label>
			<Input type="file" on:change={(e) => handleUpload(e, setValue)} />
			<Form.Input class="hidden" />
			<Form.Validation />
		</Form.Item>
	</Form.Field>

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@Hobbitive
Comment options

@Hobbitive
Comment options

Answer selected by Hobbitive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
1 participant