Hi!

I'm using webform to send data to an newsletter tool ouside my drupal installation.

This system needs the post data and the value in the <input name="xxx"> element.
How can I make webform stop wrapping my name value with submitted[] <input name="submitted[u_xxx]">?

Thanks!

Comments

marcmueller’s picture

Issue summary: View changes
swim’s picture

Webform wraps all form components inside the "submitted" array. Of course this is also reflected in the form component names.

Now I don't believe the components position will matter as long as it keeps the same key. However instead of performing a hook_form_alter and moving the form components outside of the submitted array you could add an extra submit handler and post the data there in which ever manner you wish.

quicksketch’s picture

Status: Active » Fixed

I'm using webform to send data to an newsletter tool ouside my drupal installation.

I'd suggest you use a module such as https://drupal.org/project/webform_remote_post, that will reuse the existing form keys to send a POST request server-side to your newsletter, but it will omit the "submitted" wrapper around all the form elements. You cannot remove the "submitted" wrapper from Webform without severely breaking the functionality of the module.

I'm moving this to fixed, please put back to "active" if you have further questions.

marcmueller’s picture

https://drupal.org/project/webform_remote_post

Thanks, that looks like the right thing.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.