Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Exchange standard newsletter form


NewBudda

Recommended Posts

Posted

I would like my own newsletter signup form to appear instead of the oscomm standard one.

Ideally I would like to replace the following code in the

includes/boxes/visitoremail.php:

<?php
 $info_box_contents = array();
 $info_box_contents[] = array('text' => BOX_HEADING_VISITOR_EMAIL);

 new infoBoxHeading($info_box_contents, false, false);

 $info_box_contents = array();
 $info_box_contents[] = array('form' => tep_draw_form('email', tep_href_link(FILENAME_VISITOR_EMAIL, 'action=process')),
						   'align' => 'center',
						   'text' => tep_draw_input_field('to_email_address', '', 'size="20"') . '<br>' . tep_image_submit('button_visitor_email.gif', xxxpost));

 new infoBox($info_box_contents);
?>

 

with

 <form action="http://xxxxxx.cmail1.com/s/4xxxx
		<div align="left">
		 <form action="http://xxx.cmail1.com/s/4xxxx/" method="post">
	  <div> 
		<div align="left">

		  <input type="radio" name="cm-fo-211115" id="cm53436" value="53436" />
		  <label for="cm53436">Herr</label>
		  <br />
		  <input type="radio" name="cm-fo-211115" id="cm53437" value="53437" />
		  <label for="cm53437">Frau</label>
		  <br />
		  Vorname:<br />
		  <input type="text" name="cm-f-211116" id="Vorname" />
		  <br /> <label for="name">Name:</label>
		  <br />
		  <input type="text" name="name" id="name" />
		  <br />
		  <label for="l436591-436591">Email:</label>
		  <br />
		  <input type="text" name="cm-43xxxx-436591" id="l43xxxx-436591" />
		 <br /><br>
		  <input type="submit" value="Anmelden" />
		</div>
	  </div>
</form></div>

but it doesnt work. Is there another way of replacing this form so my signups go straight to my newsletter provider?

Open Source Newsletter: PhPList

Open Source Questionnaire: Lime Survey

Posted

Couldnt i just link to another html file to display in that window? like a frame?

Open Source Newsletter: PhPList

Open Source Questionnaire: Lime Survey

Posted
Couldnt i just link to another html file to display in that window? like a frame?

 

you could use an include('html_form_name.html') command, using the name of your new html form inside the include. this will insert the code from the .html file at the point the include is within your .php code.

 

but be careful with the <form> tags in your included html file. there are likely form tags generated by the php, and browsers get confused with nested forms. it might be better to just remove the <form> tags from the html and let the php build them for you. besides, you'll want the session id added to your urls, which is only going to happen within the php code.

Archived

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

×
×
  • Create New...