Only part in Illinois plumbing code is as follows.
Section 890.360 Water Closet and Pedestal Urinal
Fixture connections between drainage pipes and water closets, floor outlet service sinks and pedestal urinals, and earthenware trap standards shall be made by means of brass, copper, hard lead, plastic, or iron flanges; caulked, soldered, screwed or solvent welded to the drainage pipe. Flanges of hard lead, plastic and iron flanges for no-hub or compression joints shall be secured to the floor. The connection shall be bolted, with a gasket, washer or setting compound, between the earthenware and the flange. The floor flange shall be set on an approved firm base. The use of putty or non-drying plumber's putty manufactured specifically for plumbing installation is acceptable
It does say it needs to be set on an approved firm base. I always put it on the sub-floor, and let the tile guys tile around it. So I make sure it will be installed flush with the finished floor.