Added formattributes to exporting to allow setting custom attributes