PDA

View Full Version : How to put form in a page?


Blogger
11-25-2008, 03:00 AM
Hi, I'm using CoffeeCup form builder to build a form but as I copied the script to the html form, I don't see the form displayed.

I upload all the files to the main folder and it just display Form Object.

Can someone help?

sarahG
11-25-2008, 07:33 AM
What blogging platform are you using?

If it's WordPress then you'd be better off creating a page template

Blogger
11-25-2008, 08:31 AM
What blogging platform are you using?

If it's WordPress then you'd be better off creating a page template

I'm using Wordpress. What do you mean by page template?

I created a page for that but when i put the code in, nothing come out. Or did I put the files in the wrong directory?

sarahG
11-25-2008, 01:07 PM
Create a WP page template, insert your form code below the_content tag and add the template file to your theme directory online. Then create a new page your WP admin and choose the new template as the Page Template

Couple of pages of reading material
http://www.bloggingtips.com/2008/05/11/page-templates-create-a-links-page/
http://www.bloggingtips.com/2008/08/24/create-a-contact-page-i/

Blogger
11-26-2008, 01:00 PM
Create a WP page template, insert your form code below the_content tag and add the template file to your theme directory online. Then create a new page your WP admin and choose the new template as the Page Template

Couple of pages of reading material
http://www.bloggingtips.com/2008/05/11/page-templates-create-a-links-page/
http://www.bloggingtips.com/2008/08/24/create-a-contact-page-i/

I'm using wordpress 2.6.5. My theme has the page.php so I save it with the name links.php. After that I add the
1. /*
2. * Template Name: Links Page
3. */ and this is how the code looks like in the links.php:

1. /*
2. * Template Name: Links Page
3. */

<?php get_header(); ?>

<div id="content_box">

<div id="content" class="pages">

<?php if (have_posts()) : while (have_posts()) : the_post(); ?>

<h2><?php the_title(); ?></h2>
<div class="entry">
<?php the_content('<p>Read the rest of this page &rarr;</p>'); ?>
<?php link_pages('<p><strong>Pages:</strong> ', '</p>', 'number'); ?>
</div>
<h4><?php if ('open' == $post-> comment_status) { ?><a href="<?php the_permalink() ?>#comments"><?php comments_number('No Comments', '1 Comment', '% Comments'); ?></a><?php } ?></h4>

<?php endwhile; endif; ?>

<?php comments_template(); ?>

</div>

<?php get_sidebar(); ?>

</div>

<?php get_footer(); ?>

After that I don't see what you mentioned in http://www.bloggingtips.com/2008/05/11/page-templates-create-a-links-page/

"and the template name will show up as an option in the Add/Edit Page page under Advanced Options and Page Template (this option only appears when there is one or more page templates available)."

May I know what's happening?

ap4a
11-26-2008, 01:03 PM
ode looks like in the links.php:

1. /*
2. * Template Name: Links Page
3. */

That bit needs to be inside <?php ?> tags.

sarahG
11-26-2008, 01:04 PM
Well, first off you need to change the page above to include your contact form, so I'd rename it to contact.php and give it a Template name of 'Contact Form'.

Then you upload it to your themes directory on your site, and then go to Write -> Page. Scroll down to the advanced options and find the one called 'Page Template'. Under there should be a drop down list, the one selected will be 'Default', so you want to change it to 'Contact Us', or at present it should say 'Links Page'.

Select the correct template. Give the page a title and content and then save the page and preview it. Once you know it's all working right you can publish it.

Edit: just saw hurricane's reply, yes the top needs to be within the PHP tags, and remove the line numbers from the start.

Blogger
11-26-2008, 01:04 PM
That bit needs to be inside <?php ?> tags.

Oh... Let me test it out.. :)

I still don't see anything after changing it..

Well, first off you need to change the page above to include your contact form, so I'd rename it to contact.php and give it a Template name of 'Contact Form'.

Then you upload it to your themes directory on your site, and then go to Write -> Page. Scroll down to the advanced options and find the one called 'Page Template'. Under there should be a drop down list, the one selected will be 'Default', so you want to change it to 'Contact Us', or at present it should say 'Links Page'.

Select the correct template. Give the page a title and content and then save the page and preview it. Once you know it's all working right you can publish it.

Edit: just saw hurricane's reply, yes the top needs to be within the PHP tags, and remove the line numbers from the start.

Actually I already have the contact page. I just want to have another page while people can upload their product's detail and photos. Can I use this also?

Ok, this is the code that I wanna put in my page

<script type="text/javascript" src="swfobject.js"></script><div id="CC4232923">Form Object</div><script type="text/javascript">var so = new SWFObject("sell.swf", "sell.xml", "401", "675", "7,0,0,0", "#ffffff");so.addParam("classid", "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000");so.addParam("quality", "high");so.addParam("scale", "noscale");so.addParam("salign", "lt");so.addParam("FlashVars", "xmlfile=sell.xml&w=401&h=675");so.write("CC4232923");</script>

I put this in the html page editor in the wordpress. The outcome is just "Form Object".

What's wrong huh?

can someone help? need it urgently.. thanks.

anhblog.net
04-19-2009, 06:37 AM
Have three way you can do it with Wordpress Blog

1. You can add and active plugin Contact Form 7 of wordpress . Then on step you create a page. You can insert or choose template. Done

2. You can create form by yourself and save to a file ( like function php ) and include it to the page you want.

3. Using plugin Exec PHP, you can insert php code to your post/page.

Goodluck

wahmsuzanne
05-16-2009, 02:05 PM
I'm not that great with code like some of you so I tried this plugin:
http://www.dagondesign.com/articles/secure-form-mailer-plugin-for-wordpress/

and I used it to do this page:

http://www.thedestinationweddingsite.com/dw-vendors/vendor-ad-submission/

and I did one other that had more fields than this one and it was pretty easy to use once I understood what I was doing LOL

Good luck! *SmiLes* Suzanne