Only clear :visible inputs in FormUtils

Fixes PMT #98178
Merge pull request #202 from ccnmtl/fix-empty-pid-bug

Only clear :visible inputs in FormUtils