Closed (fixed)
Project:
Webform
Version:
6.x-3.9
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
14 Apr 2008 at 12:18 UTC
Updated:
5 Aug 2013 at 16:41 UTC
Hi there,
I'm using the redirect URL option for my Webform and I'm posting my form to an external URL. However, the field names are returned with names starting with "submitted[xxxxx]" and the requirement is that they are posted to the URL without it.
If anyone knows a solution to this or can give me a hint on how to change the value of the name="" attribute of any given form field prior to posting to an external URL, that would be appreciated. I guess this would involve some kind of string truncating and possibly placing it in the Additional processing field, but I'm not quite sure.
Comments
Comment #1
mkrakowiak commentedI came up with something like this below, but it's not doing the job...
Any ideas?
Comment #2
quicksketchAre you sure you're using the 2.x version? The Redirect URL function was removed entirely in 2.x because of widespread confusion and extremely rare actual use.
Anything used in the Additional validation or submission fields will not have any effect because as the help text states, all processing by Webform is skipped entirely when using the redirect URL option.
I wouldn't recommend using Webform for this purpose at all. If you need to send form data to an external source you can either make a custom module or (really hacky) you can just make an HTML page containing the form, since it'll be processed by an external source anyway.
Comment #3
mkrakowiak commentedThanks for your advice, quicksketch. Yesterday I started making a module that will handle the donation form. It's based on a multistep form (using FormAPI) and it seems like it will do the job. I wanted to avoid making an HTML page containing the form, since I don't really want to rely on a client-side (javascript) validation and small calculations.
Regarding the Redirect URL: I upgraded from 1.9 to 2.0-beta2 (and then to beta3), but it still shows "Confirmation message or redirect URL:" under Webform Settings. Or am I looking at a wrong thing?
Comment #4
quicksketchOh right. "Redirect URL" still exists, I was thinking about "Redirect POST". Redirect URL just means that's the page the user will be sent to after the processing of the form is completed. It's important to note that the $_POST variable isn't available at that URL (hence the redirect).
Comment #5
mkrakowiak commentedGood point. It was a bit confusing to me and this was one of the reasons that my form didn't work.
The conclusion is (just as you stated): use Webform for creating any "internal" forms, and Form API for sending form data to an external source.
Comment #6
quicksketchThis discussion is done (I think?) Please reopen if you have further questions on this topic.
Comment #7
bailey86 commentedI currently have the same issue.
I'm using the advice at:
https://drupal.org/node/1291574
on an old Drupal site.
The webform module is 6.x-3.9
and I'm having the same problem.
I.e. - the backend interface says 'This key will be used as the name attribute of the form element. ' for the field key - but when posting I'm getting the element names back with the 'submitted' prefix.
Was this fixed as an old bug? Or is it still an issue?
Thanks,
bailey86
Comment #8
bailey86 commentedSet as bug report - I've looked at the release notes for the newer versions and is does not appear to have been fixed.