Why does my form not refresh automatically?