A metric theorem for restricted Diophantine approximation in positive characteristic