Modified dynamic form generation to grab each add-on class by its respective id, rather than its index