| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
JSON javascript code in Aform.php what does it do? | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
JSON javascript code in Aform.php what does it do?
I found the following code in XLite\class\view\form\Aform.php:
/** * javascript: this value will be returned on form submit * NOTE - this function designed for AJAX easy switch on/off * * @return string */ protected function getOnSubmitResult() { return 'true'; } /** * javascript: default action performed on form submit * * @return string */ protected function getJSOnSubmitCode() { return 'return ' . $this->getOnSubmitResult() . ';'; } What I cant seem to find is the function getJSOnSubmitCode, I would like to know what this code does and where I can find it. Obviously it relates to the xcart forms and it does something once you submit a form. I am about to create a custom form module for our site, but before I do I would like to know what this code does and where I can find it, so I can determine if I should leave it in my custom form module. Thanks in advance
__________________
x-cart business 5.2.14 |
|||||||
#2
|
|||||||||
|
|||||||||
Re: JSON javascript code in Aform.php what does it do?
Here is where the code goes into: skins/admin/modules/XC/CanadaPost/form/start.twig:
Code:
And here: skins/customer/form/start_order_search.twig: Code:
There are no other templates that use the method directly, but, as far as I see, the "onsubmit" attribute is added to other forms in a similar way automatically.
__________________
Alex Solovev, Qualiteam --- User manual Video tutorials X-Cart FAQ You are welcome to press "Thanks" button if you find this post useful Click here to learn how to apply patches X-Cart Extensions Last edited by qualiteam : 11-26-2017 at 09:48 PM. |
|||||||||
#3
|
|||||||
|
|||||||
Re: JSON javascript code in Aform.php what does it do?
Thanks so much guys,
__________________
x-cart business 5.2.14 |
|||||||
|
|||
X-Cart forums © 2001-2020
|