created the ruby code for forms