moved html for form appending from js script to hidden html input