ArdeviaForum

Dynamic Height for Page Viewer Web Part

Discussion created by ArdeviaForum on Aug 18, 2016

Original Post by Cee (Imported from Ardevia Forum)

  1. Embed your form into a Page Viewer web part using these instructions --

Embedding list form in any page

  1. Go back into Ardevia Rich Forms and edit your form
  2. Click on the [Behavior] Tab
  3. Click on the [Edit] icon in the 'Form Load Actions' section
  4. Click on [Add Action]
  5. Name your action
  6. Choose 'Execute Script' from the dropdown
  7. Paste in the following code --
    Code:
$(function(){
  var D = document;
  var dheight = Math.max(
        Math.max(D.body.scrollHeight, D.documentElement.scrollHeight),
        Math.max(D.body.offsetHeight, D.documentElement.offsetHeight),
        Math.max(D.body.clientHeight, D.documentElement.clientHeight)
    );
  var parentFrame = parent.document.getElementById(window.name);
  
  /* Only run if in frame */
  if(parentFrame){
   parentFrame.style.height = dheight + 'px';
  }    
})

  9. Click [Save]

Outcomes