Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Using Modules a...Using Modules a...Pass HTML content to MyTokens or CodeBehindPass HTML content to MyTokens or CodeBehind
Previous
 
Next
New Post
11/17/2016 10:20 AM
 

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". 

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Using Modules a...Using Modules a...Pass HTML content to MyTokens or CodeBehindPass HTML content to MyTokens or CodeBehind


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out