TMZ has learned ... moments after word got out about Travis' arrest, several locals raced over to the jail to help out -- one man posted Randy's cash bond and another man offered legal services right away.
The lawyer was Gary Corley ... who tells TMZ the area around Sherman, TX is a close-knit community where the people take care of each other ... and he wanted to "do the humanitarian thing" and help Travis.
When Corley arrived to the jail, he briefly met with Randy, offered his services, and told him about the legion of photographers waiting outside the jail to shoot the singer.
Corley tells us he was wearing his Texas hat at the time, but decided Randy probably needed it more ... and literally gave him the cap right off of his head so the singer could shield his face from shutterbugs on his way out.
We're told Corley had a car waiting for Travis in case he wanted a ride ... but the man who posted Randy's cash bond had already arranged for transportation ... so Randy went with his money man.
So far, we're told Randy has not officially hired an attorney ... but Corley says he'll be there if he needs him.