Yuriy Posted January 4, 2018 Share Posted January 4, 2018 (edited) Hi community, Prestashop v.1.6.0.14 I tried to put the js function in the end of /themes/express/authentication.tpl, and called it with: <form action="{$link->getPageLink('authentication', true)|escape:'html':'UTF-8'}" method="post" id="account-creation_form" class="std box" onsubmit="theFunction()"> from inside the authentication.tpl, but it runs theFunction() each time REGISTER is pressed, even if form is not validly filled. More attempts were made... Validation of form is sunk in depts of php. Call theFunction() before redirect from controllers/front/AuthController.php? How? I'm not sure it's worth installing something like V8Js to call js from a php controller. Maybe put the function when "Registration Successful!" page is shown up, but I can't track the page appearing. What is the best practice? Thanks in advance! Edited January 5, 2018 by Yuriy (see edit history) 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