building JavaScript form schema based on OPTIONS request