lightbox form changed values retained on Cancel

Hi there,

I’m seeing the following behaviour If I open up an existing event using the lightbox form (heavily customised) and change any of the values and press cancel rather than save:

  1. The values are correctly not saved to the DB. So this is fine.
  2. If I re-open the event, I see the changed values rather than the original values. - PROBLEM.
  3. Refreshing the browser and re-opening the event, again shows the original values. This is also fine.

Is there a built-in way to reset the lightbox form values to it’s original values so that point 2 won’t happen?

Many thanks for your help.


Normally, each time when you open form , lightbox calls set_value for all form sections. So it always represent the actual state of events ( if you have added new form sections - be sure that they support set_value method )

If you are using fully custom form, be sure that before showing it you are calling some code to set the initial values.