Auto-populating pages from form data
-
Hey, I’ve got a form that, once filled and submitted, will create and autopopulate a page with content from the form. The code works great for normal text, but I want to also want to hardcode a video-embed code on some of those pages by adding the embed code to the portion of the code the describes the content of the page to be created.
The problem is that this embed code involves many different types of characters ( ;, “, : etc) and only portions of the embed code are able to make it to the final, created page.
I tried to use the urlencode() php function for parts of it, but with no success. And just as a test, I used the htmlentities() php function and ALL of the code made it through, but showed up as actual text on the screen (as the function is intended to do) instead of an embedded video. The original embed code is as follows:
<div class="wistia_responsive_padding" style="padding:56.25% 0 0 0;position:relative;"><div class="wistia_responsive_wrapper" style="height:100%;left:0;position:absolute;top:0;width:100%;"><iframe src="//fast.wistia.net/embed/iframe/12345678?seo=false&videoFoam=true" allowtransparency="true" frameborder="0" scrolling="no" class="wistia_embed" name="wistia_embed" allowfullscreen mozallowfullscreen webkitallowfullscreen oallowfullscreen msallowfullscreen width="100%" height="100%"></iframe></div></div> <script src="//fast.wistia.net/assets/external/E-v1.js" async></script>And from that code, all that makes it to the final created page is:
<div class="wistia_responsive_padding" style="padding:56.25% 0 0 0"><div class="wistia_responsive_wrapper" style="height:100%;width:100%"></div></div>Any suggestions on how to get the full embed code to the final page? Thanks so much.
The topic ‘Auto-populating pages from form data’ is closed to new replies.