Search code examples
dotnetnuke-module2sxc

2sxc public form submissions


Hello SO and 2sxc team,

Is it possible to use 2sxc to accept form submissions. Ie: can a user enter data into a series of inputs and those inputs get emailed to a supplied address?

Thanks


Solution

  • Yes and no.

    If you just use the standard 2sxc REST api (http://2sxc.org/en/Learn/REST-for-JavaScript), you can send data to it and store it. There are some requirements like that the app needs to be configured to allow anonymous writes etc.

    But that won't send an e-mail. So you can do two things

    1. Send two requests, one to save, one to create the e-mail on your own API
    2. Create a small custom API which uses the App.Data.Create in C#, then sends the mail.