Closed (duplicate)
Project:
Webform
Version:
5.x-2.0
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
5 Jun 2008 at 08:14 UTC
Updated:
5 Jun 2008 at 09:13 UTC
I've got a webform that I've loaded into a block, via code like this:
<?php
$node = node_load(320);
print node_view($node);
?>
Which makes it easy enough to display wherever I want it. However, if the user attempts to submit the form with invalid or missing values, it redirects to itself - that is to the original form node page, rather than the page that's displaying the block.
Is there any fix for this? Can someone suggest a way to cause an invalid submit to reload the containing page, without losing the values in the form, rather than the redirect?
(Sorry for the flood of issues from me lately - and thanks for a great module!)
Comments
Comment #1
quicksketchNo worries. Just if you submit a lot of issues. PLEASE search first. This is a duplicate. See http://drupal.org/node/250767.
Comment #2
meeotch commentedUpdate: a workaround that sort of works in the case where the block is only being used once... Make the webform be the containing page, and put the rest of the content in a block, displayed on the webform page.
However, this doesn't work for my case, sadly. I'm using a "sid=xxx" argument in the URL to pull some info out of a previously submitted form. (Basically, the user has submitted his project elsewhere, and now needs to upload some files.) Unfortunately, an invalid submit loses the arguments in the URL - I assume because of the redirect mentioned above.
I'm guessing there's some way of doing this by stuffing the project sid into a session variable, and using that to pull the project info. But I'm a bit hazy on the details.
Comment #3
meeotch commentedOops! Looks like I was posting my update, just as you were posting yours. ;-) I'll post further comments to that other thread. (Thanks for linking - my earlier search missed it, apparently.)
Comment #4
quicksketchThanks :)