When I use the url redirection from the Gizmo survey, on the redirected page of my site I can easily parse the data out of the url, that works fine. But I want to use the HTTP POST method (so the users cannot see the data sent and I can send more data), but I don't seem to get the data. The data is sent correctly from my survey when testing on a Gizmo test site.
But trying to echo the posted variables via $_POST("var") in my Drupal site, always returns 0, it looks like the PHP code in the page (that I have to enter in the GizmoSurvey POST settings), is not executed. Testing this by trying to create a file on that page is supporting this, because that file is created when I just visit this page in my Drupal site, but is not created when finishing the survey.
Maybe this has something to do with the page not being "activated"? Because when I use url-redirection my Drupal site goes to that page, but when I use HTTP POST the page doesn't change (it is still showing the "thank you for finishing ..." page of the survey. Maybe someone can help?
Comments
Comment #1
garbanzito commentedThis module doesn't provide any method for getting the survey data back from SurveyGizmo to your Drupal site. But if you look at this module's code, and look at SurveyGizmo's developer documentation, you'll have some boilerplate for writing your own code to retrieve SurveyGizmo data.
Comment #2
BasH commentedWell it may work as designed, but that is why I added this as a support call. Maybe its my lack of Drupal/PHP knowledge but I just cannot get/show the posted data from my survey in my Drupal site. The problem is not specific for this module I think, but more how and where to collect the posted data in my Drupal site.
When my survey has been completed I am still on the same Drupal page, so how can I collect the data (of which I know it is posted, I did test that part). I like to execute, for instance, an action (collect_posted_data) as soon as the survey has been completed, but where do I have to put this code, because when the user decides to go to another page, I think the posted data cannot be retrieved anymore?
I posted this question here because I thought maybe someone already uses this post method with this specific module.
(but maybe I have to post it in a more general project..)
Thanks for your review/answers so far.
Comment #3
garbanzito commented(Please respect the meanings of the status codes: http://drupal.org/node/156119 )
You're right, the problem is not specific for this module. My instinct is that it would be best to submit the survey to SurveyGizmo normally, then use SurveyGizmo's API (see comment #1) to retrieve result data, but I don't fully understand your use case. I think you'll need to write a custom module.
At this point I would consider the developer forum or the developer mailing list:
http://drupal.org/forum/4
http://drupal.org/mailing-lists
SurveyGizmo also has free email support, which may help if you have trouble using their API:
http://www.surveygizmo.com/survey-support/