Develop Branch Forms plugin problem
Using the latest Git pull of the develop branch and Forms plugin module.
I've created a form in Fuel and set "Form Display" to auto, a couple of basic fields, javascript submit and some "after submit" text. I've added the form to a page using {form('myform')}.
If I fill in the form and click submit, I see the "sending..." text and the message gets sent but instead of seeing my nice "after submit" text, I get an embedded version of the whole page (header, page text & footer) along with the "after submit" text.
Have I not configured something correctly?
Cheers
Comments
Where would that be?
The submitSuccess function gets called but instead of displaying the text, it displays the whole page.
This seems to to be a Firefox only problem, Chrome seems to work.
jquery.forms::ajaxSubmit(formOptions) is failing to pass X_REQUESTED_WITH properly.
Annoyingly, this currently seems to be specific to Linux Firefox only (v37.0.2 on my rig). Historically though, there seems to be combinations of js and jquery that cause X_REQUESTED_WITH to disappear such that we can't rely on that header to tell us if it's an ajax call or not.
1) Created a test ajax page with just HTML:
<html> <head> <title>TEST</title> <script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> </head> <body> <h1>This following infomation is AJAXed in and should display the "[HTTP_X_REQUESTED_WITH] => XMLHttpRequest" information:</h1> <div id="ajaxed"></div> $.ajaxSetup ({ // Disable caching of AJAX responses cache: false }); <script type="text/javascript"> // run a simple ajax request... doesn't matter to what page $(function(){ $('#ajaxed').load('test_ajax.php'); }) </script> </body> </html>
2) The "test_ajax.php" page just outputs the contents of the server variable:
<p>Below is the output:</p> <?php echo '<pre>'; print_r($_SERVER); echo '</pre>'; ?>
3) Then as a check to test a non-AJAX call for comparison:
<h1>The following information should <u>NOT</u> display the "[HTTP_X_REQUESTED_WITH] => XMLHttpRequest" information:</h1> <p>This is just a simple page with the following PHP code:</p> <code> <p>Below is the output:</p> <?php echo '<pre>'; print_r($_SERVER); echo '</pre>'; ?>