Issue #1975198 by Zarabadoo: Replace the Form API state functionality wi...

...th custom javascript since states get confused with multiple similar forms on the same page.