File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -421,16 +421,14 @@ private function initialize(): void
421421 $ formId = Crawler::xpathLiteral ($ this ->node ->getAttribute ('id ' ));
422422
423423 $ fieldNodes = $ xpath ->query (\sprintf ('( descendant::input[@form=%s] | descendant::button[@form=%1$s] | descendant::textarea[@form=%1$s] | descendant::select[@form=%1$s] | //form[@id=%1$s]//input[not(@form)] | //form[@id=%1$s]//button[not(@form)] | //form[@id=%1$s]//textarea[not(@form)] | //form[@id=%1$s]//select[not(@form)] )[( not(ancestor::template) or ancestor::turbo-stream )] ' , $ formId ));
424- foreach ($ fieldNodes as $ node ) {
425- $ this ->addField ($ node );
426- }
427424 } else {
428425 // do the xpath query with $this->node as the context node, to only find descendant elements
429426 // however, descendant elements with form attribute are not part of this form
430427 $ fieldNodes = $ xpath ->query ('( descendant::input[not(@form)] | descendant::button[not(@form)] | descendant::textarea[not(@form)] | descendant::select[not(@form)] )[( not(ancestor::template) or ancestor::turbo-stream )] ' , $ this ->node );
431- foreach ($ fieldNodes as $ node ) {
432- $ this ->addField ($ node );
433- }
428+ }
429+
430+ foreach ($ fieldNodes as $ node ) {
431+ $ this ->addField ($ node );
434432 }
435433
436434 if ($ this ->baseHref && '' !== $ this ->node ->getAttribute ('action ' )) {
You can’t perform that action at this time.
0 commit comments