Save layer state between form submissions