I am familiar using ctools and modal forms. But now I have to implement multiple nested modal forms. I have a link "Edit contact", this opens a modal form. At the top of the form I have another link "Delete contact", which opens a second modal form which asks the user if he/she is sure if he/she wants to delete the contact.
The response of the first modal form (as expected) is in JSON format: This works nice and easy.
When I click "Delete contact" (second modal form), the response is HTML:
Because of this reponse I get following error: