An active role for magnetic fields in solar flares