newtech Posted June 21, 2007 Share Posted June 21, 2007 In checkout_success.php I have included a form that is used for buyers to sign up for a newsletter. When the submit button is clicked it sends them to the store index page instead of to the URL in the action command. This does not make sense. Any ideas? ?> <h3><?php echo TEXT_THANKS_FOR_SHOPPING; ?></h3></td> </tr> <tr> <td> <div class="newsletter_button"><br /> <form name="form1" method="post" action="http://emailer.emailroi.com/multisubscribe.ice"> <input type=text name="Email" size=20 maxlength=120 value="enter email" style="margin-left: 18px"onFocus="if(this.value=='enter email')this.value='';"> <input name="Submit" type="image" value=img src="../images/newsletter_submit.jpg" > <br> <input type=hidden name="username" value="robinryan"> <input type=hidden name="list1" value="Subscriber"> <input type=hidden name="mandatory" value="Email"> <input type=hidden name="thankyou_message" value="../newsletter_thankyou.htm"> <input type=hidden name="trigger" value="Subscriber_autoresponder"> </form></td> </tr> </table> Link to comment Share on other sites More sharing options...
newtech Posted June 21, 2007 Author Share Posted June 21, 2007 In checkout_success.php I have included a form that is used for buyers to sign up for a newsletter. When the submit button is clicked it sends them to the store index page instead of to the URL in the action command.This does not make sense. Any ideas? I should mention that when I move my cursor over the submit buutton it shows teh following URL: http://mydomain.com/store/checkout_success.php?action=update Link to comment Share on other sites More sharing options...
newtech Posted June 21, 2007 Author Share Posted June 21, 2007 I tested the newsletter signup form on a product page. When you click submit it takes you to the shopping cart and places the product in the shopping cart. So, what is happening is that instead of reading the form action for the submit button, oscommerce is assuming that you are clicking the submit button of the oscommerce page. Is there anyway to get around this? Link to comment Share on other sites More sharing options...
Guest Posted June 21, 2007 Share Posted June 21, 2007 you probably left the other form in there too binded with the submit button. And you don't create forms like this. You should use the tep_ osc functions. Link to comment Share on other sites More sharing options...
newtech Posted June 22, 2007 Author Share Posted June 22, 2007 you probably left the other form in there too binded with the submit button. And you don't create forms like this. You should use the tep_ osc functions. The following is the code that I use for this newsletter subscription throughout my site outside of the store. How would I use this form using tep_osc function-have no idea what to do. <form name="form1" method="post" action="http://emailer.emailroi.com/multisubscribe.ice"><input type=text name="Email" size=20 maxlength=120 value="enter email" style="margin-left: 18px"onFocus="if(this.value=='enter email')this.value='';"> <input name="Submit" type="image" value=img src="../images/newsletter_submit.jpg" > <br> <input type=hidden name="username" value="robinryan"> <input type=hidden name="list1" value="Subscriber"> <input type=hidden name="mandatory" value="Email"> <input type=hidden name="thankyou_message" value="../newsletter_thankyou.htm"> <input type=hidden name="trigger" value="Subscriber_autoresponder"> </form> Link to comment Share on other sites More sharing options...
Guest Posted June 22, 2007 Share Posted June 22, 2007 see how the tep_draw.....functions are used in the osc files. The process html elements and emit html code. tep_draw_form is used for forms. The checkout_success.php uses it already. You cannot nest forms. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.