AJAX with the sandbox

This snippet shows an example of the usage of the sandbox in an AJAX event context.


The value $iCounter increments and is persisted on each click on the button.


Also note how the sandbox implements an init() method, automatically called by the Framework if defined, giving the developper a chance to initalize some internal members, in our case, the typoscript conf taken from the parent plugin.


For a complete reference of the properties available while defining a sandbox, have a look at the Formidable reference:


Working example