Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Additional fields on contact page


Guest

Recommended Posts

Posted

Hi Can anyone tell me how to get additional fields on my contact page included in my email.

At the moment the only field that is emailed is the ENQUIRY field.

I need the customer to enter their Tel No. in a different field and have that included in the email.

 

Many Thanks

Tony

Posted

add the following to contact_us.php file:

 

find:

<tr>
	<td class="main"><?php echo ENTRY_ENQUIRY; ?></td>
	</tr>
	<tr>
	<td><?php echo tep_draw_textarea_field('enquiry', 'soft', 50, 15); ?></td>
	</tr>

add below:

 

<tr>
	<td class="main"><?php echo "Your Text box:"; ?></td>
	</tr>
	<tr>
	<td><?php echo tep_draw_textarea_field('my_text_box_name', 'soft', 50, 15); ?></td>
	</tr>

or if you want to have field box:

<tr>
	<td class="main"><?php echo "Your field box:"; ?></td>
	</tr>
	<tr>
	<td><?php echo tep_draw_input_field('my_text_field_name'); ?></td>
	</tr>

 

also find in the same file:

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

add after:

 

for text box

$enquiry .= "\n\n" . tep_db_prepare_input($HTTP_POST_VARS['my_text_box_name']);

or for field box

$enquiry .= "\n\n" . tep_db_prepare_input($HTTP_POST_VARS['my_text_field_name']);

Please read this line: Do you want to find all the answers to your questions? click here. As for contribution database it's located here!

8 people out of 10 don't bother to read installation manuals. I can recommend: if you can't read the installation manual, don't bother to install any contribution yourself.

Before installing contribution or editing/updating/deleting any files, do the full backup, it will save to you & everyone here on the forum time to fix your issues.

Any issues with oscommerce, I am here to help you.

Posted

Thanks Alex

That works just fine

Could I include some radio buttons ie. Do you have a car yes/do

is so can you tell me the code.

 

Sorry to be a pain

Tony

Archived

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

×
×
  • Create New...