Ideally you got to take it out and leave it to air dry (under the sun, better). In the end, it depends on the severity of wetness/moisture the carpet has been exposed to. Hope you can provide more details.
Yung 2nd row ng avanza ko eh nabuhusan ng mga bata ng pitcher ng tubig. Basa yung matting and carpet. Tried to clean up by using a MF towel to soak up excess water.
If its the floor carpet is soaking wet (as in a puddle of formed after the spill) then it is advisable remove the carpet (usually its the entire panel) and air dry it. That way, you'll be sure it that it dries up completely. If you leave it on the vehicle to dry, it would take longer to dry and you can't be sure for certain if it dried up already.
If the "wet" carpet did not completely dry up, it would leave this really foul odor that would linger in your car until you have the carpet washed and completely dry. This happened to one of our cars. It still has an odor and we're to lazy to remove, wash and dry the carpet. :D