A novel approach to the development of acidity and alkalinity field tests, based on length of stain detectors, is discussed. The detectors consist of glass capillaries filled with sol-gel silica powder doped with pH indicators. When water is sampled through the tube detectors the alkaline or acidic species titrate the silanol groups on the glass surface, in the presence of the immobilized indicator, and colour a section of the capillary. The length of the coloured section depends on the alkalinity (or acidity) of the sampled solution. The effects of glass parameters, such as concentration of the silanol groups and the type and concentration of the immobilized pH indicators, are discussed.