Form in Ant drawer component

I would like to place a form in Ant DS drawer component in its children slot and submit the form with a button that is placed in the footer slot. In such situation, how do I link the submit button with a form?

I see that the button has a Submits form parameter, but it only works when button is placed within a form tag, so it does not work in my case. Thanks for help.

Hi, you should be able to attach an interaction in the submit that is able to access the state of the form, this way you can use any value added in the form in any way that you want, but you may want to validate the form fields, so you can do it by creating an action that does that before using the values in the form. An example in the following image.
Captura de Tela 2024-01-16 às 22.52.55

1 Like

Ok, and what if I don’t have any elements to select? Do I have to somehow configure form in order to make it actionable?

Maybe it is also worth to mention that I did not use a special form component to create a form but rather created one manually and assigned manually a form tag to a container of all form fields.

This is one of the drawbacks of manually implementing the form, you end up not having some util functionalities as the fields validation, but you should still be able to have the button submit the content normally. If you need to validate it get’s a bit trickier because you would need to implement the validations yourself using actions that run code expressions.