Loading html in modal form through plugin


#1

I am developing a plugin, which involves a form being loaded into a modal. This would need to fetched through an AJAX call (ideally), and I would like this to be in a tpl so that it would customizable.

I have tried several ways: I can display the modal form, and I can manage to get my handlers to be called to start preparing the form. However, I cannot get the form displayed.

I have tried fetch(), but I think the scripts would be expecting a JSON message. I have tried also with fetchJSON, but still it is not working. I am not sure if it is a question of authorising my scripts for my use.

Thanks in advance

Stephen