Serialize form to js object