Is this seriously not possible, but updating the background color is?
$w.onReady(function () { $w('#html1').onMessage((event) => { var data = JSON.parse(event.data); if(data.height) { document.getElementById(data.id).style.height = data.height; } }); });
Alright that might be a doable workaround but the fact that simple height changes are not possible for Wix DOM elements is just wild. Especially if you consider that I followed that issue in 2019 and people are still trying to find a solution.
Thank you so much for the time spent composing this, but neither moving elements nor using the full screen view work for my context. I need to change the height attribute of the iFrame component.
Maybe the full screen one if I have to, but honestly, at that point, I might as well redirect the user to another server where the forms are hosted and just replicate the header on Wix.
Actually, I can't do a workaround do change the iFrame height, and the more I've looked at the forums, I see that this is just not doable.
Frustrating. I was so excited to finally not have forms embedded in iFrames not have spacing issues on our pages.
Is this still the case? I just added a bunch of code to have my iFrames and parent pages talk to each other so I could know an exact height to set the iFrame to.
If this isn't possible, I'm going to try some wacky workarounds like setting a line height on a text item with one character, or something, next to the iFrame and see if that works.
It's seriously not possible.
WixCode understands all of Javascript, except for anything that accesses the DOM. This keeps the user from inadvertently "breaking" something. Accessing document elements such as div, span, button, etc is off-limits. The way to access elements on the page is only through $w.