Update sms_form.php

Add code to support different version of Moodle.