I took the solution from here: Magento 2.2 - adding name field to newsletter module
It is working fine on a CMS page but it is interrupting work of the standard subscribe form.
Exception message: Notice: Undefined variable: result
We have it in the footer of the website and it is not working now. Any advice on that