Comment block error

I have created two modules, one for posts, the other for comments. Added an automatic button to create records when you click on it. How do I set up a button so that when it is clicked, it also sends data to the comments block? Because when I click on the button, I get an error saying that she does not know the name of the variables from the second block

that is, I mean, how do I add an entry to one module while being in another?