In the US at least, a mentally ill person can only be committed against their will if they are deemed an active threat to themselves of others, and it has been that way for decades. The days of involuntary in-patient institutions are largely over.