Create new module

Hello

I’m trying to create new module for freepbx and it’s working well but i have some simple issue.

My module have many pages like page.module.php it has a form in it and a submit button that POST to other php page.

When the user press the submit button the results appear but in new page, and not in same freepbx window in template with freepbx menus around results.

What should i do so my other pages don’t lunch in new windows, and lunch in same window in freepbx template.

When i click module name in freepbx menu it appear first page in freepbx template, but when i press submit at this page a new page appear with results but without freepbx template (menus, bars etc.)

Please help me and tell me what to write. (at least one little hint)

Hi again

My module have this files:

module.xml - only page.test1.php is menuitem at setup;

page.test1.php - it’s the main page display=test1, it appear correctly, and have a submit.

page.test2.php - this page takes the post from page.test1.php and make an output on screen.

My page.test1.php at form section have this:

< form action="/admin/modules/test/page.test2.php" method=post >

now when i press submit button it appears in browser at link bar:
"http://192.168.1.1/admin/modules/test/page.test2.php"
And the right output in a blank page but without freepbx elements.

Your ideea was to make something like

< form action=‘config.php?type=tool&display=configedit’ method=‘POST’ >
What should i write at display= ? cause just test is a menu item not test2 the second page.

If i need to put some javascript please help me i am not so good at java script.

Thank you very much

Make sure your form tag looks something like this:

< form action=‘config.php?type=tool&display=configedit’ method=‘POST’ >

where type is either setup or tool (depending on what you’ve configured) and display is the name of your module