stolarz Posted December 10, 2014 Share Posted December 10, 2014 (edited) Hi, I've made form like this in product.tpl in my theme directory and also php script in the same directory. My problem is, that it doesn't work, it doesn't go to script. Here is example: http://vigdm.no-restrictions.com/moda-damska/560-sukienka.html Form is under gold button "Do koszyka", first two fields are required, third is optional (additional info) and last is required (email). If you notice some mistake, please let me know Form in product.tpl <form method = "post" action ={"../themes/villaitalia_gold/rent.php"}> <input name = "link" type = "hidden" value = {$smarty.server.HTTP_HOST}{$smarty.server.REQUEST_URI}> <label> Od <input name = "date_from" type = "date" required> </label> <label> Do <input name = "date_to" type = "date" required> </label> <label> Dodatkowe info <input name = "additional_info" type = "textarea"> </label> <label> Twój mail <input name = "email" type = "email" required> </label> <input name = "submit" type = "submit"> </form> Php script rent.php like this <?php $linkToProduct = $_POST['link']; $dateFrom = $_POST['date_from']; $dateTo = $_POST['date_to']; $additionalInfo = $_POST['additional_info']; $email = $_POST['email']; $message = "Produkt: $linkToProduct \nOd: $dateFrom \nDo: $dateTo"; $recipient = "[email protected]"; $subject = "Wypozyczenie produktu"; $mailheader = "From: $email \r\n"; mail($recipient, $subject, $message, $mailheader); header( 'Location: http://vigdm.no-restrictions.com/content/15-stylizacja-wyslana-do-wyceny') ; Edited December 10, 2014 by stolarz (see edit history) Link to comment Share on other sites More sharing options...
gonebdg - webindoshop.com Posted December 10, 2014 Share Posted December 10, 2014 The {} punctuation characters is for smarty var e.g {$base_dir} action ={"../themes/villaitalia_gold/rent.php"} >>> action ="{$base_dir}themes/villaitalia_gold/rent.php" Link to comment Share on other sites More sharing options...
stolarz Posted December 11, 2014 Author Share Posted December 11, 2014 HI, thanks for reply. I've made that change on my local version, nothing has changed unfortunately. Do you have any other idea where the problem could be? May it be that some js file block or change my custom form? Link to comment Share on other sites More sharing options...
stolarz Posted December 11, 2014 Author Share Posted December 11, 2014 Ok, I've found solution, I had form in form. Topic to close. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now