Menu

Action Form Notes

Action Form is a module developed by DNNSharp.com for the DNN Content Management System and Development Platform. The developers at LetItShine.biz have used the Action Form module for countless projects and solutions for a number of years. The following is an modest collection of notes that we have started to record about techniques to take advantage of the strengths of this module. We record this here not to become a secondary help system for Action Form users or DNNSharp. But if you can find something here that helps you, that makes us happy too.

Return to the list

Reload page but keep scroll position

Mark Buelsing 0 3 Article rating: No rating

// to restore the scroll position after re initialize use this JS

<script>
document.addEventListener("DOMContentLoaded", function(event) { 
  var scrollpos = localStorage.getItem('scrollpos');
     if (scrollpos) window.scrollTo(0, scrollpos);
   });

 window.onbeforeunload = function(e) {
   localStorage.setItem('scrollpos', window.scrollY);
  };

</script>

Remove ActionGrid Page Numbers from QueryString

Mark Buelsing 0 106 Article rating: No rating

 

 

This will remove the page numbers from the querystring. But as it is, it sometimes causes the page to reload. Thi example sets what it wants the querystring to be.


    setTimeout(function () {
        window.history.pushState({}, document.title, "/" + 'book/BID/1' );}
    ,2000);
    setTimeout(function () {
        window.history.pushState({}, document.title, "/" + 'book/BID/1' );}
    ,3000);

 

Getting Action Form Data and Reports

Mark Buelsing 0 128 Article rating: No rating

Link to prefill form submissions. 

http://aveschoir.org/ACA-Fest?entry=5da0b1e8-8332-49a6-b76f-94b74caab84f

The GUID that you put in the link can be found in the action form reports table, avtActionForm_Reports.

Here is the token to insert in an email to get a link  back to the form with the content inserted:
[_EditUrl]


Here is a sample SQL query to get that data for a 

SELECT 'ReportEntryId: ' +
      CONVERT(nvarchar(10),ReportEntryId) + ' UserID: ' + 
      CONVERT(nvarchar(10),UserId) + ' submitted on: ' + 
      CONVERT(nvarchar(11),DateSubmitted, 102) + '|' + 
      CONVERT(char(36),ValidationKey)

  FROM db_AvesChoir.dbo.avtActionForm_Reports
  WHERE ModuleID = 1037
   ORDER BY ReportEntryId desc

This query could be improved by including some data from the form submission, like a name of the person submitting the form. That data is stored in the record in an xml format.
 

Move Pop-Up Form title Left of X

Mark Buelsing 0 99 Article rating: No rating

Action Form, the pop-up form title shows in the wrong place, to the right of the X to close the form. Use this script to move the text to the left. Put it in the initialization Scripts in the form settings.

 

$('.modal-header h4').insertBefore($('.modal-header button'));

RSS
12345