A
A
Andrey Sergeev2021-05-03 11:38:53
MODX
Andrey Sergeev, 2021-05-03 11:38:53

How to call a snippet on a button?

How to call a custom snippet on a button?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Danny Arty, 2021-05-03
@sergeevsite

AjaxSnippet

A
Anton Tarasov, 2021-05-03
@an-tar

Yes, AjaxSnippet will probably be the most convenient, but you can (if for some reason AjaxSnippet is not suitable) and through the custom Formit hook (after converting your snippet into a hook - https://docs.modx.com/current/en/extras/ formit/for... ) or simply submitting the form to a page where to call your snippet and parse the incoming POST array

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question