Contact form as plug-in always redirects to index page
I'm playing around with Framework builder and trying to build a generic contact form as plug-in for inclusion on a php page.
I've created a blank page and added a form to it and then used Universal Email for sending the form contents in an email. I've then referred to this file as my plug-in and added it to a page that is based on a dreamweaver template page.
The contact form displays correctly as a plug-in, but the email doesn't get sent and instead of re-directing to my 'enquiry sent' page it tries to redirect to the index page (which doesn't exist).
If I load the plug-in page itself the redirect works properly? I've attached my files - any help with this is appreciated.