Refactored form submission check for improved readability and safety

Closes #3503695

Merge request reports

Loading