pass form elements as JSON object and change class name