js: add option to save form with json content type