Uniform, multiple registration forms dynamically generated from page

Hello again,
I have a problem with the Uniform plugin, my page contenucours show the children page cours. Each cours use a registration form using Uniform. The problem is when I registered for one cours, the success message is shown in all the other cours.

I understand the error is related to the form’s same session storage by default.
Then the difficulty for me, because the forms are dynamically generated from the children and I cannot create forms with unique name to have unique session storage, is how to inject something to do this job?
Is it possible to have something similar idcount for forms? Or to introduce in the cours page in the panel a number variable that can be introduce in the controller to generate unique forms and unique session storage dynamically?

I hope my description is clear enough, thank you for your help

From what are the forms generated and why is it not possible to assign an id to these forms in the snippets that generates them?

Hello pixelijn,
(once again your answer sounds for me like kōan: “From what are the forms generated?”, mostly because I’m not quite at ease with the whole image of good kirby coding :upside_down_face:)

I try to answer your question, I go step by step because at the same time I’m trying to understand the logic as I am typing: contenucours is a page with children cours, each cours use a regitration-form, so I would say the form are generated from the inputs from the registration-form
So I’m guessing from the snippet cours it might be possible to assign an id, I’m using idcount to identify the differents modals, maybe I can use that idcount again like <?php snippet('registration-form', ['cours' => $cour->title()]), ['id' => $idCount?]);?> Realising that [‘id’ => $idCount?] is not the correct syntax, here I might need some help, thanks.

Ok, I found my mistake <?php snippet('registration-form', ['cours' => $cour->title(), 'condition' => $cour->condition(), 'id' => $idCount]);?>

So, now I’ve got my id in the controller $_data… Can you help me on where and how to assign that id to the$form please, thank you?