MODX Community

Form post to snippet

Hi All,

I know from my past experience that the easiest way to post a fully customized form (without using formit and other extras), is to post it to a resource that calls a snippet. This has been working very well.

But recently saw someone pointing out that this method is not the only one that works.
My question is:
What other ways do I have to post a form to a snippet? I mean: can I do it directy without a gateway resource?
I don’t see a way to do this without using a gateway resource that will receive the post information. Does not seem logical.

Thanks in advance.

1 Like

you could load MODX externally from a php-file
https://docs.modx.org/current/en/extending-modx/modx-class/loading-externally

or create a rest - endpoint

https://docs.modx.org/current/en/extending-modx/developing-restful-api

but if it is only to run a snippet, I think, I would prefer just to create a resource, where the snippet is called

2 Likes