simsalabim/sisyphus

Fields dynamically added to a form once it is protected are not saved, even if protect() is called again

Closed this issue · 2 comments

I think the issue is with this code in protect():

if ( ! params.started ) {
  self.bindSaveData();
  params.started = true;
}

bindSaveData() is only called the first time sisyphus() is invoked. What is the rationale for this check?

A duplication of #26

@nschneid I ran into a similar issue with a form with fields that are dynamically generated (on user action). Calling bindSaveData() on the sisyphused instance of my form fixed the issue for me.