Skip to content

sl-dialog child elements not appended to FormData #2156

Closed Answered by thomp361
thomp361 asked this question in Help
Discussion options

You must be logged in to vote

Yes, sorry for the typo on the form attachment (id/name).

I found out what was causing the issue.

Our pages are submitted with the form.submit() method. form.submit() does not trigger the SubmitEvent which is the event Shoelace is listening to inject data into FormData.

Solutions are to submit using form.requestSubmit() as that triggers SubmitEvent. Or add the form attribute to the sl-dialog's child elements.

Thanks for your help!

Replies: 3 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@KonnorRogers
Comment options

Comment options

You must be logged in to vote
3 replies
@claviska
Comment options

@thomp361
Comment options

@claviska
Comment options

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