Forms shown with an accordion

Hi,
I’d like to have a multi-part form. Since there are possibly many parts in my form, I thought that instead of using tabs (like the example posted by Teodor here), I’d use an Accordion Cards element and put my Input variables within the Dynamic Collapse section of each of the Cards.

However, I cannot drag an Accordion Cards element inside a Form nor I cannot insert Accordion Cards underneath the Form (something that would like this in the App Structure)

 Form
     Accordion Cards
         Card 1
         Card 2
         Card 2

I imagine that what I’m trying to do is syntactically incorrect – although I don’t know why.

So my question is, a I on the right path or not? If I’m not, is there another way to do what I need to do?

Many thanks in advance for your help!!

Alex

OK. I think I found a workaround. I’m a bit ashamed that I did not thin of it earlier, because it’s really simple. I guess I was lured by the glitz of the Accordion Card :slight_smile:

Disclaimer: this is likely to be very obvious to most people in this forum. I’m sharing the approach just in case some other newbie like me is trying to do the same and gets as stuck as I got.

Credits: This approach was in truth inspired by Teodor’s article on how to do something similar using Tabs.

I have a form with form rows inside. For each step, I use two form rows, one to hold the Title and another to hold the content.

I use a variable called Step to keeps track of which “step” I am – and by extension, which content to show.

I did it for just three steps but the method is obviously extensible.

The 3 Rows used for titles are always shown. I painted them in Blue for contrast.

The 3 rows used for content are shown only when the Step has “their” value. Thus Row Step2_Content is shown only when Step == 2 and so on.

I captured the click of a title row as a Dynamic Event and use it to set the Step variable to the corresponding value, e.g. if I click on the row Step2_Title I set the Step variable to 2 and so on.

That’s it.
The structure looks like this:

If you’re trying to do this and the above is not very clear, just let me know and I’ll try to expand.

I no longer need to use the Accordion, but would nonetheless like to understand why what I was doing before did not work.

Many thanks!

Alex