Added support to serialize form data to array