My expertise on the topic is limited and I would like to achieve the following:
1. User fills in a form (I am using Bootstrap if it makes any difference, the form is in a modal): text content, radio buttons for yes/no, ...
2. User clicks the submit button
3. A Lua script is executed by openresty taking as input the filled-in data
I don't want anything else to happen (in particular, no new page should be loaded).
If I understand correctly I could use:
https://github.com/openresty/lua-nginx-module#ngxreqget_post_args
in conjunction with <form action="" method="post">, but that does not satisfy the requirement of staying on the same page.
I considered onsubmit + some _javascript_, but how can I pass the execution flow (and the data) to openresty's Lua interpreter?
It seems to me a reasonably common use case but I could not find an answer, any suggestions on how to proceed?
Thank you.
-- Stefano [http://ulua.io]