Embed a form from an external website
Is it possible to embed a form from an third party site within a form block?
The reason I ask is because I have sourced a form with another website company but when I embed the code it does not recognise that a user is logged in. To overcome this at the moment I instruct the user to enter their username again. This doesn't make sense to them and I could lose users because of it.
Maybe you could use an iframe and pass the username as a GET parameter?
<?php $u = new User(); $username = $u->getUserName(); ?> <iframe height="300" frameborder="0" scrolling="no" width="300" src="http://www.formsite.com/?username=<?php echo $username; ?>"></iframe>
Then you need to ask the other company to add the GET parameter value to the form.
Would the above code mean that a username will be in the URL once they Log In/Register. How and where exactly would I implement the above code? I reckon this would need to be attached to the Log In/Register box, am I right, and how is this done?
I think the easiest way to achieve would be to create a single page for this purpose:
You can then add the form iframe to this page with the PHP code which adds the username of the logged in user.
I have added the single page. I've followed the instructions in the link you provided but it I am not sure I am doing it right. I have pasted the newly created php file to the concrete theme folder as instructed but it is not allowing me to add blocks like other pages.
Then, how/where do I add php code to pull the name of the user?
Then the content from the file is used in the single pages you have created through Dashboard.
Read the instructions for single pages again to understand how they work. :)
Have it in the Single page folder and copied the php code from the theme php file and pasted it to the single page php file.
Looks perfect now.
Thanks for your help.
On a similar vein to my original question, is it possible to have the website recognise when a user is signed on at all times i.e. the username is reflected in the url on every page until the user signs out.