Not in the book, a naked druid with his head in a sack, gagged, and trussed up like a calf at a rodeo will just turn into an animal and escape as soon as he is alone.
A fully enclosed chamber without any holes big enough for a tiny animal would do it but when that door opens expect to deal with a pissed off druid in his most powerful beast form.
Just make up rules for magic in your game, the druids learned their wild shape ability from the fey and so cold iron manacles with the proper runes on them prevent the ability, if it is necessary.
But taking any spellcaster hostage is always dangerous, most npc's in my world execute them, or at least mutilate them (no hands, no tongue, no eyes = no magic) if they have to keep them around.
Good kingdoms, might have invented anti-magic brands, collars, bracers, or other device to control imprisoned spellcasters.