Pug template each traversal fills in form elements respectively, why one has and one does not

-sharpaccordion1.panel-group
                        each val,index in projectInfo.formModels
                            .panel.panel-default
                                .panel-heading
                                    h4.panel-title
                                        a(href=`-sharp${val.id}`, data-toggle="collapse")
                                            | -sharp{val.formName}
                                .panel-collapse.collapse(id=val.id)
                                    .panel-body
                                        form

as above is the accordion code of bootstrap, I want to add a form form to the body of each accordion so that I can get the corresponding data later, but after traversing it and displaying it on html, there is no form element in the first body, and there is the second one. If all other elements can be traversed, this is the case with form. Have you encountered this situation? Who can help explain why? Thank you very much!

Mar.12,2021
Menu