Hi, I'm a newbie in prestashop. I use prestashop 1.6. I want to make a form in custom page that within the form there will be a hidden/shown field depends on another field value. To make it clear, here is the example:
I want to hide or show the "upload image" div depends on "Masukan jumlah yang ingin dipesan" field (quantity field). If it is less than 50, the "upload image" div will be hidden, otherwise, if it is more than 50 the "upload image" div will be shown. I know how to do this by using "onchange" event listener. The strange thing is, I already typed "onchange" event listener in my source code block, and then when I save the custom page, it is gone. As if prestashop don't want to save my "onchange" event listener. I already searched the topic in this forum, but I cant find any similar topic.
Is there anyone here who can help me?
Note:
I already put the javascript file that contains the function that will be executed in "onchange" event listener on themes/mytheme/js/autoload, and I put the css file for the hidden/shown class rules on theme/mytheme/css/autoload.