here's my situation: I want to create a template with a logo in the navigation. This logo is being uploaded through the template editor as usual and always has the same file name. However, the filename extension can be either .svg, .png or .jpg.
I want to solve this by using the PHP function file_exists but can't seem to get it to work in the template editor. It seems PHP code is automatically being removed or changed in there. Is there some other way to use PHP in there or, alternatively, disable the code correction?
Why isn't it possible to control suffix of the file? Seems quite unusual since you need to modify the template in a manual way.
PHP is not working. JavaScript in form of AJAX (since you want to check something on the server side) or EM variables (if it is good enough to assign the correct suffix via a hidden variable in the survey-file).
Get some inspiration from this old thread:
www.limesurvey.org/forum/design-issues/7...-pstpl-template-file