In Denmark, there is no legal requirement that your dog or cat must be restrained or sit in a transport cage when you are out driving with your dog or cat. It is, however, a requirement that the animal you ride with must be suitable for "transport", I think this is made so that you don't squeeze your horse into your old Polo - there are, however, requirements for water and feed, so it must just be aware of.
If we go abroad, there are rules in several places, such as in Sweden. Here, your dog or cat must be strapped in or in a transport cage, there are also requirements for the size of the transport cage you must use. You can actually be fined for this, even if you "just" need a quick trip to Bornholm. In Germany, it is also a legal requirement that one's dog or cat must be harnessed or in a transport cage while driving.
Fortunately, we have a lot for this at Uswithpets.dk . so there is no reason to expose your safety or fellow passengers to unnecessary danger.
See selection of transport bags and harnesses, for a safe drive with the dog.
Dog transport & Bags
Jacob N. Masters In Uswithpets.dk