For simple formatting / validation functions, Javascript could be used instead of PHP. Furthermore, the formatting / validation function could be written directly in the form configurator (through a popup editor) without editing custom_functions.js