简体   繁体   中英

Is it possible to get content or tokens from DNNSharp's Action Form or Action Grid and display it inside of a 2sxc template?

I'm creating a page in DNN that allows users to see 3 candidates which they can vote for. I have this set up in 2sxc.

Then, I have an DNNSharp Action Form which has the 3 candidates in a hidden radio button list. I've done some simple but clever development to make it so that the user can select a candidate from the 2sxc module and it selects the respective radio button in Action Form.

投票页面

Finally, I have an admin page for the site administrator to view the results of the submissions to the Action Form. I'm trying to create a nicely designed "voting results" page where I display the number of votes each candidate received as well as the percentage of the vote. Like this:

投票结果概念

Is there a way that I can retreive the data from Action Form and display it inside a 2sxc C# template? I would need the number of votes they received as well as the number of total votes so I could calculate the percentage. Is this possible or should I try a different method?

Action Form stores the results of form submissions in a table. I would create an app that retrieves data from the table, and displays the results.

Use 2sxc's Visual Query to to get the data from Action Form the sql table.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM