Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How do I add another text field / contact_us


NetGiaco

Recommended Posts

Hi,

 

I have been trying to add another text filed to contact_us page without prevail. I need this as an email form. I am trying to create Registration form. Not affiliated with account sign up. I need it to emailed to me.

Looking to create something like this.

 

Name:

Email address:

User name:

Password: (not encrypted)

 

If anyone has any ideas or could direct me to another location it would be much appreciated.

 

Thanks ? Marty D.

Link to comment
Share on other sites

This hides their password in the browser but comes to you in email in plain text. It does not verify the password and confimation are the same but you get a copy of both.

 

Add this to /catalog/includes/languages/english.php

 

define('ENTRY_USERNAME', 'Username:');

 

In /catalog/contact_us.php

 

under $enquiry = tep_db_prepare_input($HTTP_POST_VARS['enquiry']);

Add

 
   $email_text = ENTRY_USERNAME . tep_db_prepare_input($HTTP_POST_VARS['username']) . "\n" .
              ENTRY_PASSWORD . tep_db_prepare_input($HTTP_POST_VARS['password']) . "\n" .
     ENTRY_PASSWORD_CONFIRMATION . " " . tep_db_prepare_input($HTTP_POST_VARS['confirmation']);

 

Change

 

tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, EMAIL_SUBJECT, $enquiry, $name, $email_address);

to

 

      tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, EMAIL_SUBJECT, $email_text, $name, $email_address);

 

replace

 

<tr>

<td class="main"><?php echo ENTRY_ENQUIRY; ?></td>

</tr>

<tr>

<td><?php echo tep_draw_textarea_field('enquiry', 'soft', 50, 15); ?></td>

</tr>

 

with

<tr>
               <td class="main"><?php echo ENTRY_USERNAME; ?></td>
               <td class="main"><?php echo tep_draw_input_field('username'); ?></td>
             </tr>
             <tr>

             <tr>
               <td class="main"><?php echo ENTRY_PASSWORD; ?></td>
               <td class="main"><?php echo tep_draw_password_field('password'); ?></td>
             </tr>
             <tr>
               <td class="main"><?php echo ENTRY_PASSWORD_CONFIRMATION; ?></td>
               <td class="main"><?php echo tep_draw_password_field('confirmation'); ?></td>
             </tr>

 

If you want them to be able to see their password when they type it use tep_draw_input_field instead of tep_draw_password_field

while (!succeed) {try()};

 

GMT -6:00

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...