If this is your first visit, check our documentation. To post, register or login.

Customizing the Contact Us form

Locked

Started by laplatakid on 29 Nov 2006, 5:20 PM · Views: 14,591

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
29 Nov 2006, 5:20 PM
#1
laplatakid avatar

laplatakid

New Zenner

Join Date:
Sep 2006
Posts:
34
Plugin Contributions:
0

Post #1 by laplatakid

I guess I still haven't completely figured out the file structure in Zen Cart! Please point me in the correct direction.

The problem? I've set up an elaborate custom contact form through the Define Pages Editor (../includes/template/my_template/tpl_contact_us.php) but find that the standard contact form appears at the bottom of the form. I'd like to use my form in place of the standard one but haven't been able to find the file that generates the standard form.

What file contains the default form for the contact us page?

Thanks,

Jim

29 Nov 2006, 5:26 PM
#2
clydejones avatar

clydejones

Deceased

Join Date:
Nov 2005
Location:
Colorado Springs, CO USA
Posts:
7,017
Plugin Contributions:
12

Post #2 by clydejones

The default file is tpl_contact_us_default.php

NOTE: We are sorry that Clyde is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

29 Nov 2006, 6:03 PM
#3
laplatakid avatar

laplatakid

New Zenner

Join Date:
Sep 2006
Posts:
34
Plugin Contributions:
0

Post #3 by laplatakid

clydejones:

The default file is tpl_contact_us_default.php
Thanks, Clyde. Found it. Now all I have to do is decipher all of the Zen Cart coding and, probably, define some more constants in my english.php. As far as that goes, I don't even see where the form tag starts!

<div class="alert forward"><?php echo FORM_REQUIRED_INFORMATION; ?></div>
<br class="clearBoth" />

<?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', ($error ? $_POST['email'] : $email), ' 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', '', 'id="enquiry"'); ?>

</fieldset>

<div class="buttonRow forward"><?php echo zen_image_submit(BUTTON_IMAGE_SEND, BUTTON_SEND_ALT); ?></div>
<div class="buttonRow back"><?php echo zen_back_link() . zen_image_button(BUTTON_IMAGE_BACK, BUTTON_BACK_ALT) . '</a>'; ?></div>
<?php
  }
?>
</form>
```I suppose I can just replace this code with the html code I want to use... Or even leave this file empty and go with what I have in the define_contact_us.php file (I blew it! The file mentioned in the original post should have been define_contact_us.php).

Thanks again,

Jim