Aaron - Wolf X Machina
Aaron - Wolf X Machina

Reputation: 643

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.

The voting page

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:

voting results concept

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?

Upvotes: 0

Views: 328

Answers (1)

Joe Craig
Joe Craig

Reputation: 1264

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.

Upvotes: 1

Related Questions