ridgedale Posted January 24, 2018 Share Posted January 24, 2018 (edited) Reference: PW 3.0.62 and uikit3 based site using the Regular-Master profile. I wonder if anyone might be able to assist. I've setup a custom field to allow contributors to enter the html code to display an iframe. When I try to call the field nothing is displayed: echo $page->get("/contact")->urliframecode; When I inspect the element nothing is being passed to the web browser. If I enter the code directly in the template, the iframe is displayed correctly. I've tried configuring the custom field has been configured as type text area and as both Unknown/Text as well as Markup/HTML without any success. Any idea where I am going wrong? Edited January 25, 2018 by ridgedale Solution found Link to comment Share on other sites More sharing options...
kongondo Posted January 24, 2018 Share Posted January 24, 2018 Most likely CKEditor eating up your iframe code if you've not configured (Input Tab) it to allow such code. If that's the case: 1 Link to comment Share on other sites More sharing options...
ridgedale Posted January 25, 2018 Author Share Posted January 25, 2018 Hi kongondo, Thank you for the reply and the topic link. My searches did not uncover that thread. A lot of my searches tend to return zero results, possibily because I'm entering too much information. It was very helpful to be aware of the potential issues in relation to allowing contributors/users the ability to enter code into fields. Having read through it all I decided to replace the field I setup to hold the iframe code with two fields the contributors can copy and paste the relevant URLs within the iframe code into them as the remainder of the iframe code is identical and it avoids any potential the security issues. Then I needed to do was replace the URLs in the iframe code on the template with the processwire code to load the data from the fields. Many thanks again. Link to comment Share on other sites More sharing options...
kongondo Posted January 25, 2018 Share Posted January 25, 2018 19 minutes ago, ridgedale said: My searches did not uncover that thread. A lot of my searches tend to return zero results, Seems like you are using the forum's inbuilt search function? It's not the best. Try google, e.g. iframe site:processwire.com/talk/ OR this CSE (the one in my signature) OR...there are other similar ones (including a plugin) in the forums. Can't find it now . 21 minutes ago, ridgedale said: Having read through it all I decided to replace the field I setup to hold the iframe code with two fields the contributors can copy and paste the relevant URLs Are the URLs dynamic or set some place? You could save your editors some copying and pasting by having those ready-made and selectable in some inputfield, e.g. Fieldtype Options. I don't know you setup so my suggestion might not be appropriate. Just a thought. Link to comment Share on other sites More sharing options...
ridgedale Posted January 25, 2018 Author Share Posted January 25, 2018 26 minutes ago, kongondo said: Seems like you are using the forum's inbuilt search function? It's not the best. Try google ... That's exactly what I have been doing ... searching the forums using the built-in search then following up with a Google search. 27 minutes ago, kongondo said: OR this CSE (the one in my signature) OR...there are other similar ones (including a plugin) in the forums. I'll give that a try and have a hunt round the forums. Thanks. 28 minutes ago, kongondo said: Are the URLs dynamic or set some place? The iframe contains OpenStreetMap data. The contributors/users just need to follow the instructions how to add a location map for their group. The locations could be anywhere. If no URLs are entered, that section of code is ignored. Hope that makes sense. Thanks again for your assistance. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now