this adds a self invoking wrapping function to scope the variables to the local block.
Otherwise if the plugin was included multiple times (because there were multiple JSON-Fields in the form) the second script tag’s variables such as container would overwrite the ones from the first tag resulting in the same data being submitted for all models.
this adds a self invoking wrapping function to scope the variables to the local block. Otherwise if the plugin was included multiple times (because there were multiple JSON-Fields in the form) the second
script
tag’s variables such ascontainer
would overwrite the ones from the first tag resulting in the same data being submitted for all models.Fixes #3