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
AJAX via jQuery:
api.jquery.com/jquery.ajax/
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
AJAX via jQuery:
api.jquery.com/jquery.ajax/