How to add custom page in lead module

Thanks in advance,

Here I have added custom button on the detail view page in the lead module, and trying to open custom page on click of this button, everything is working fine if I add normal HTML form in my custom page, But if I put HTML like this " $viewdefs[‘Contacts’] (Standard of suitecrm) " then it prints the given content.
I am unable to find that what I doing wrong.

Hi,

to get help with code issues, you really need to paste here the entire files (or the relevant segments) and their exact path, and exactly which errors you’re getting.

(have you checked your web server log for PHP errors?)

ok,
I have added button on this file.
/custom/modules/Leads/metadata/detailviewdefs.php
then I create the custom page like.
/custom/modules/Leads/metadata/editprocessviewdefs.php
My controller is
/custom/modules/Leads/controller.php
view file is.
/custom/modules/Leads/views/view.editprocess.php
error is
https://prnt.sc/kadwav

Are you using any print_r or vardump in your code? It seems to be dumping information about arrays onto the screen…

Or maybe you’re missing a bracket somewhere…

No there are not any print_r and I checked that there are not missing any bracket.