darkroast
Member
I'm working on a form in which I want to run a PHP script when the form is submitted. I'm using the PHP Plugin, and it's set to process onAfterSubmit. Here's the code I have so far:
Couple questions come up when I run this:
1. I expect the display to show up within the template (in other words, in the content area), but instead it opens a new browser window with JUST the following on a white background:
So, how do I get it to show up correctly?
2. I also used the code that should print out the structure of the elements (the last line of code). But it doesn't print.
What do I need to do?
Thanks!
PHP:
<p>fedgov.php</p>
<?php
// No direct access
defined ('_JEXEC') or die ('Direct access to this location is prohibited');
echo "<h3>Contact Your Federal Government</h3>";
echo "<h4>Your email is being sent to the following people:</h4>";
echo "<pre>";print_r($formModel->_formData);exit;
?>
Couple questions come up when I run this:
1. I expect the display to show up within the template (in other words, in the content area), but instead it opens a new browser window with JUST the following on a white background:
fedgov.php
Contact Your Federal Government
Your email is being sent to the following people:
So, how do I get it to show up correctly?
2. I also used the code that should print out the structure of the elements (the last line of code). But it doesn't print.
What do I need to do?
Thanks!