serialize the template design into json before submiting the form