I'm new to DNN, but familiar with C# and ASP.NET. I need to tie an action form in with a rest API. I have been able to achieve this so far using action forms and MyTokens, however I have a problem with passing the contents of an HTML text box using MyTokens. If the HTML formatting contains more than a simple line with text it seems to mess the token up. I'll try to break this down with as much relevant info as possible.
Action Form with 3 fields. 2 text boxes (Name & Subject) and 1 HTML text editor (Description).
Submit button sends an email, with the following token as the subject line: [Ticket:Create(Name="[Name]",Subject="[Subject]",Description="[Description]")]
The [Ticket:Create] token then calls out to a rest API and creates a ticket, returning the ticket number which should be placed in the subject line (HTTP Post/Response). The problem I run into is with passing the contents of the description field, which is HTML, to the token. Complex html seems to break the token syntax. I have tried doing this with both a custom HTTP Post/Response token, and a custom Razor script.
Can this be done using MyTokens? If not, is there a way I can just write my own action for an action form in C#, without using tokens? I don't see a way to access the form fields without using tokens, and tokens break with complex HTML. In ASP.NET I would be able to do this in the code behind fairly easily as the form field values would be accessible. As far as I can tell, when using MyTokens you have to pass the form field values to the token using "TknParams".