Foam is caused by dish soap getting into the dishwasher or when rinse aid is spilled when filling up the rinse aid compartment. Always mop up any spilled rinse aid with a cloth before using the dishwasher as it could lead to excessive foaming during the next washing cycle.