I'm trying to redirect the form Submission dynamically so i tried using the php code at the input format. It didn't work so i checked and sow at webform.module:1882 the redirection handling. There's no evaluation of the php code anywhere. I believe it's a bug so please tell me if it's not and if it's supposed the be evaluated before or is there any other way to redirect dynamically.
Comments
Comment #1
shua commentedhere's my fix on webform.module. I know it's ugly but it works:
Comment #2
quicksketchIt looks like PHP code is only executed on display of the summary, not when determining where the summary should be shown. You can see that Webform uses check_markup in template_preprocess_webform_confirmation():
Note that check_markup() is the proper way for executing PHP contained within a Input Format.
To do what you're describing, I'd recommend using the Additional Processing field instead of trying to input PHP into the confirmation message area. See the examples in the Webform handbook: http://drupal.org/handbook/modules/webform/submission-code
Comment #3
shua commentedThanks, i think that the php input option should be removed if it doesn't work any way
Comment #4
quicksketchThe PHP input format doesn't exist on all Drupal sites. In fact in Drupal 6 it's disabled by default and you have to enable the PHP Filter module in order for it to be created. Disabling the Input Format on that field would also mean that you couldn't use other filters, such as BBCode or Markdown if you wanted, making the confirmation message inconsistent with other textareas in Drupal. Lastly, you *could* use PHP code if you wanted in that field, but only to generate a confirmation message, not to change the behavior of the submission.
I'm marking this issue as fixed, since this is by design and I don't think it should be changed.