Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2009
    Posts
    79
    Plugin Contributions
    1

    help question 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.
    Code:
     <?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.

    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.
    Flip Perry
    S~Scents

  2. #2
    Join Date
    Feb 2009
    Posts
    79
    Plugin Contributions
    1

    help question 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!

    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:
    Code:
    <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
    Could someone please help me out here??? I would greatly appreciate it!
    Flip Perry
    S~Scents

  3. #3
    Join Date
    Feb 2009
    Posts
    79
    Plugin Contributions
    1

    Default 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

  4. #4
    Join Date
    Feb 2009
    Posts
    79
    Plugin Contributions
    1

    Default 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).

    IT WORKED!!!
    Flip Perry
    S~Scents

 

 

Similar Threads

  1. Contact Form "From" field on Contact Us page
    By manutd98 in forum Customization from the Admin
    Replies: 8
    Last Post: 7 Nov 2019, 11:41 PM
  2. Replacing "Filter Results by ABC" with "Sort by: Price, Date added"
    By vandiermen in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 25 Aug 2010, 09:18 AM
  3. Replacing "model" with "part number"
    By enigma666666 in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 26 May 2010, 09:52 PM
  4. "Subscribe to Newsletter" ability when completing "Contact Us" form
    By dcitsolutions in forum General Questions
    Replies: 2
    Last Post: 27 Apr 2010, 01:38 AM
  5. Replacing "Buy Now" button with Product URL
    By kaulpo in forum General Questions
    Replies: 3
    Last Post: 12 Jul 2009, 02:08 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR