I think this is a very basic question, but I am searching for hours and can't find anything that works :-(
I have a Drupal Webform to collect personal information about my users and send it to another page with Drupal module "Webform Remote Post" (It removes "submitted").
The name attributes of the input tags look like this:
<input name="submitted[address]">
I can use this data in PHP like this:
$address = $_POST['address'];
But the problem are the Date fields. Here the name attributes look like this:
<select name="submitted[dob][day]">
I already tried this:
$day = $_POST['date']['day'];
It always gives a value of "1".
How can I get the day value with $_Post?
Thank you!
Comments
Comment #2
Dirkozoid CreditAttribution: Dirkozoid commentedComment #3
Dirkozoid CreditAttribution: Dirkozoid commentedComment #4
Liam MorlandYou can always look at a variable by enabling the devel module and calling dpm(). Then you can see where this is stored.
Comment #5
Dirkozoid CreditAttribution: Dirkozoid commentedI created a hidden and disabled field and use javascript to transfer the day to it:
This works, but only for the admin (who has access to the webform results). For normal users the webform isn't submitted. So I can't hide the field with webform, I have to do it with CSS?
Isn't there another solution? This isn't an issue anymore, it's a bug...
Comment #6
Liam MorlandAll parts of a date are submitted with the form.
If you think it is a bug, please provide steps to reproduce the problem, expected behavior, and observed behavior.
Comment #7
Dirkozoid CreditAttribution: Dirkozoid commentedI created a text field and set it to 'disabled' and the form is not sent and the submit button keeps disabled for users who don't have result access (everybody except admin in my case). I expected that the form gets submitted.
Comment #8
apadernoI am removing issue tags used from one to four issues.