js and form functions cleanup

form repopulation working for existing submissions.. cleaned up script
for dynamic field hide/shows, removed dead code. added todo for
submitter max