Forums / Templates, Stylesheets, Page Layout / Replacing "Contact Form" with my own

Replacing "Contact Form" with my own

Locked

Views: 954

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
22 Jul 2010, 6:35 PM
#1
flipperry avatar

flipperry

New Zenner

Join Date:
Feb 2009
Posts:
79
Plugin Contributions:
0

Replacing "Contact Form" with my own

ZC: 1.3.9d

I have my own contact form that I would like to be able to use on the "Contact Us" page in place of the default form, but I'm not sure how to go about doing the changes.
I have a BELLmailer PHP contact form, it has two files (BELLmailer.php and config.php) and all I need to bring it up in a php file is to add the following code to that file.

 <?php include "BELLmailer.php"; ?>

It is completely "Self contained," as in I don't need any other files except one to put the above code in.

What file(s) do I need to edit, where are they, and what parts of the code do I need to replace?

You can see the contact form I'm talking about HERE. I am wanting to move all of my "main" website files to the shopping cart using EZ Pages (Already figured that part out) except that I would like to still use the default "Contact Us" page with this form instead of the default form.

:frusty:I have been searching the forum for a few hours, and even did a search in my Developer's Tool Kit (in my Admin), but I can't figure this out, and I don't want to mess up my site.

Any help would be greatly appreciated.:hug:

Flip Perry
S~Scents

23 Jul 2010, 5:37 AM
#2
flipperry avatar

flipperry

New Zenner

Join Date:
Feb 2009
Posts:
79
Plugin Contributions:
0

Re: Replacing "Contact Form" with my own

OK, so I have my contact form showing up where I want it to, but the default contact form is still there!:no:

If you want to see what it's doing, click here. (I am also having some problems with my login/create account page coming up when it's not supposed to, sorry if that happens to you. I posted this "log in" problem elsewhere in the forum.)

Here is where I put the code for my form (my code is in red) inside of includes/templates/CUSTOM/tpl_contact_us_default.php:

<fieldset id="contactUsForm">
<legend><?php echo HEADING_TITLE; ?></legend>
<div class="alert forward"><?php echo FORM_REQUIRED_INFORMATION; ?></div>
<br class="clearBoth" />
<?php include "BELLmailer.php"; ?>
<?php
// show dropdown if set
    if (CONTACT_US_LIST !=''){
?>
<label class="inputLabel" for="send-to"><?php echo SEND_TO_TEXT; ?></label>
<?php echo zen_draw_pull_down_menu('send_to',  $send_to_array, 0, 'id="send-to"') . '<span class="alert">' . ENTRY_REQUIRED_SYMBOL . '</span>'; ?>
<br class="clearBoth" />
<?php
    }
?>

<label class="inputLabel" for="contactname"><?php echo ENTRY_NAME; ?></label>
<?php echo zen_draw_input_field('contactname', $name, ' size="40" id="contactname"') . '<span class="alert">' . ENTRY_REQUIRED_SYMBOL . '</span>'; ?>
<br class="clearBoth" />

<label class="inputLabel" for="email-address"><?php echo ENTRY_EMAIL; ?></label>
<?php echo zen_draw_input_field('email', ($email_address), ' size="40" id="email-address"') . '<span class="alert">' . ENTRY_REQUIRED_SYMBOL . '</span>'; ?>
<br class="clearBoth" />

<label for="enquiry"><?php echo ENTRY_ENQUIRY . '<span class="alert">' . ENTRY_REQUIRED_SYMBOL . '</span>'; ?></label>
<?php echo zen_draw_textarea_field('enquiry', '30', '7', $enquiry, 'id="enquiry"'); ?>

</fieldset>

I'm sure there should be some way for me to remove these fields (maybe by commenting them out or something. Deleting the lines removes EVERYTHING, including my define_pages info!), either in the includes/templates/CUSTOM/tpl_contact_us_default.php or one of the other files associated with the default form. I have been working on this since about 10 AM, and it is now 11:30 PM:frusty::lamo:
Could someone please help me out here??? I would greatly appreciate it!

Flip Perry
S~Scents

23 Jul 2010, 2:38 PM
#3
flipperry avatar

flipperry

New Zenner

Join Date:
Feb 2009
Posts:
79
Plugin Contributions:
0

Re: Replacing "Contact Form" with my own

Why?

I want to have a security code on my contact form, and the "reCAPTCHA" mod in the add ons section won't show up on a secure page (I think it's better to have a secure page for a contact form) and I kept getting error codes when I was trying to use it (btw, how do I remove the sql codes? there wasn't an uninstall file with that mod).

I've decided to just create my own Contact_Us.php file, use EZ Pages (external link), and uploaded it to just inside my store folder (public_html/store/). That way I can just have all of my Contact Us page on one page (define_pages_editor information as well as the contact form).

But do you know how to make it so that there is the drop-down menu in my contact form? That's the only feature of the default form that I wanted to keep. I could send you the files (3, if you include the readme.txt) so you could look them over if you'd like? I'm not good at creating my own code, just copy/paste and editing existing code.

Thanks!

Flip Perry
S~Scents

23 Jul 2010, 3:23 PM
#4
flipperry avatar

flipperry

New Zenner

Join Date:
Feb 2009
Posts:
79
Plugin Contributions:
0

Re: Replacing "Contact Form" with my own

I ended up making an EZ Page for contact us: Here

I had to change a line of code in includes/templates/CUSTOM/templates/tpl_page_default.php in order for the php to work in the html portion of my EZ Page. I found the code change in another part of the forum (PHP in EZ Pages or something like that).:clap:

IT WORKED!!!

Flip Perry
S~Scents