Web Form in a WordPress site - Page 2...

User 2073552 Photo


Registered User
1,625 posts

You use the code I just gave... This will allow you to past the Iframe into a WP Site using this plugin.

http://wordpress.org/extend/plugins/embed-iframe/
"An Apple doth not fall far from its tree, yet an orange does."

https://lbwebsitedesign.com - Responsive Web Design & Web Hosting Services.
http://helpsite.sirage.com - HTML5, CSS3 and CC Help Video Blog.
User 373703 Photo


Registered User
74 posts

Ok, got the iframe page made with the form code on it. Inserted the iframe (form.html) on the Contact page. Now I have an iframe (with scroll bars) of Page Not Found. I still need to know where to upload the CC Contact Form files. Because no matter where I put them WP does not find them.

Lloyd
User 2073552 Photo


Registered User
1,625 posts

It is not WP that is trying to find the files... It is the I-Frame. Which means that you have not setup the form.html correctly, or uploaded it...
"An Apple doth not fall far from its tree, yet an orange does."

https://lbwebsitedesign.com - Responsive Web Design & Web Hosting Services.
http://helpsite.sirage.com - HTML5, CSS3 and CC Help Video Blog.
User 373703 Photo


Registered User
74 posts

Thanks for the help. I'll just use a WP plugin form and forget using the CC.

Lloyd
User 187934 Photo


Senior Advisor
20,271 posts

This users almost got it.
http://www.coffeecup.com/forums/web-for … post183642

Can you say "Sharing links is cool".:);)

Edit: This users got it.!:)
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 2073552 Photo


Registered User
1,625 posts

I would agree with Eric. You have not provided enough information for us to help. We need to see the files or the site or the code at the very least to try and help you. Screen shots of the page will not help. It is like trying to fix a Grandfather clock with basic knowledge of clock works and a blind fold on.

Throw us a bone and I am sure we can help you. :D Might I suggest just uploading the form to a site page that we can view?
"An Apple doth not fall far from its tree, yet an orange does."

https://lbwebsitedesign.com - Responsive Web Design & Web Hosting Services.
http://helpsite.sirage.com - HTML5, CSS3 and CC Help Video Blog.
User 464893 Photo


Ambassador
1,611 posts

Sorry Lloyd, I just came back to the thread, I misunderstood I checked and linked to a form but then I just created the the form in S_Drive and loaded the code into a page. I also tried a I Frame as suggested. You have to make sure the form works first. Trouble is Wordpress is a CMS system and the posts are in a database.

However I am about to try just creating the form in html. I created this simple form and tried it on a page with the handler and got it working. As the action points to my domain I can handle saving data and send out necessary emails.

ie
<form name="Form1" method="post" action="http://domain/display.php" enctype="multipart/form-data" id="Form1">
<input type="text" id="Editbox1" style="position:absolute;left:68px;top:11px;width:148px;height:20px;border:1px #C0C0C0 solid;font-family:'Courier New';font-size:16px;z-index:0" name="name" value="">
<input type="text" id="Editbox2" style="position:absolute;left:69px;top:43px;width:148px;height:20px;border:1px #C0C0C0 solid;font-family:'Courier New';font-size:16px;z-index:1" name="email" value="" >
<div id="bv_Text1" style="margin:0;padding:0;position:absolute;left:16px;top:14px;width:42px;height:16px;text-align:left;z-index:2;">
<font style="font-size:13px" color="#000000" face="Arial">Name</font></div>
<div id="bv_Text2" style="margin:0;padding:0;position:absolute;left:16px;top:47px;width:45px;height:16px;text-align:left;z-index:3;">
<font style="font-size:13px" color="#000000" face="Arial">Email</font></div>
<textarea name="comment" id="TextArea1" style="position:absolute;left:32px;top:76px;width:170px;height:107px;border:1px #C0C0C0 solid;font-family:'Courier New';font-size:16px;z-index:4" rows="4" cols="13"></textarea>
<input type="submit" id="Button1" name="Button1" value="Submit" style="position:absolute;left:104px;top:202px;width:75px;height:24px;font-family:Arial;font-size:13px;z-index:5">
</form>
</div>
</div>
This is the php handler I tested

<?php
error_reporting(E_ALL & ~E_NOTICE);
// This is the form handler
// Information is passed by the post action in the html page on submit
// The information is placed in variables thus
$name=$_POST['name'];
$email=$_POST['email'];
$comment=$_POST['comment'];
//The values from the form are now in variables
// The data can be saved or emailed or displayed
// this demonstrates the display method see the html part
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Untitled Page</title>
<style type="text/css">
div#container
{
width: 1000px;
height: 600px;
margin-top: 0px;
margin-left: 0px;
text-align: left;
}
</style>
<style type="text/css">
body
{
background-color: #FFFFFF;
color: #000000;
}
</style>
<style type="text/css">
a:hover
{
color: #D20302;
}
</style>
</head>
<body>
<div id="container">
<div id="bv_Text1" style="margin:0;padding:0;position:absolute;left:334px;top:45px;width:331px;height:36px;text-align:left;z-index:0;">
<font style="font-size:16px" color="#000000" face="Arial">This demonstrates the display of submitted data</font></div>
<div id="bv_Text2" style="margin:0;padding:0;position:absolute;left:326px;top:122px;width:73px;height:16px;text-align:left;z-index:1;">
<font style="font-size:13px" color="#000000" face="Arial">Your Name</font></div>
<input type="text" id="Editbox1" style="position:absolute;left:418px;top:118px;width:148px;height:20px;border:1px #C0C0C0 solid;font-family:'Courier New';font-size:16px;z-index:2" name="Name" value=<?php echo $name ?> >
<div id="bv_Text3" style="margin:0;padding:0;position:absolute;left:320px;top:167px;width:77px;height:16px;text-align:left;z-index:3;">
<font style="font-size:13px" color="#000000" face="Arial">Your email</font></div>
<input type="text" id="Editbox2" style="position:absolute;left:420px;top:159px;width:148px;height:20px;border:1px #C0C0C0 solid;font-family:'Courier New';font-size:16px;z-index:4" name="email" value=<?php echo $email ?>>

<textarea name="TextArea1" id="TextArea1" style="position:absolute;left:350px;top:220px;width:244px;height:148px;border:1px #C0C0C0 solid;font-family:'Courier New';font-size:16px;z-index:5" rows="7" cols="21"><?php echo $comment ?></textarea>
<div id="bv_Text4" style="margin:0;padding:0;position:absolute;left:459px;top:195px;width:61px;height:16px;text-align:left;z-index:6;">
<font style="font-size:13px" color="#000000" face="Arial">You Said</font></div>
</div>
</body>
</html




I will help with the handler if you go this route
The Guy from OZ


User 464893 Photo


Ambassador
1,611 posts

I am having problems with the submit ie the action is not passing to the handler even when giving it the full address. Bit of work to do. By the way I stripped the absolute positioning. I want to use a form without having to resort to the plugin. Ongoing research I am afraid. If I get it working I am going to need a Jquery expert to tidy things up.
The Guy from OZ


User 464893 Photo


Ambassador
1,611 posts

This works The display is on my site. Additional elements can be added to both the html and the php handler.

This is a test to see whether I can get a simple form action working.
<br>
<br>
<br>
The Form

<form name="Form1" method="post" action="http://inkmon.org/display.php" enctype="multipart/form-data" id="Form1">
<br>
Name
<input type="text" id="Editbox1" name="name" value="">
<br>
Email
<input type="text" id="Editbox2" name="email" value="" >
<br>
Comment
<textarea name="comment" id="TextArea1" rows="4" cols="13"></textarea>
<input type="submit" id="Button1" name="Button1" value="Submit" >


The php display file is shown a previous post and can be tested in my blog
http://inkmon.org/myblog

Yay! works, need Eric to pretty it up

The Guy from OZ


User 373703 Photo


Registered User
74 posts

Sorry guys, here's the website address: http://discninja.com/contact-us/ Obviously, I can't give you the admin login info.

Prism,
You obviously understand the problem with doing this on a WP site, just because of the way it works (CMS system). But, after looking at the problem I came up with a different way to do it.
1) Create your form.
2) Create a sub-domain at your web host. (I used discninja.com/webform)
3) Create a webpage a little larger than your form and insert the form onto it. Upload to the sub-domain.
4) Create an iframe on the WP page where the form is to go and link it to sub-domain address.
No php handler needed for a straight form-to-email submission, since the form is not actually built into the WP page.

Lloyd


Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.