building query string from form definition