- Posts: 62
- Thank you received: 3
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
run php script on completion of a survey
- Maverick87Shaka
- Offline
- Senior Member
Less
More
7 years 11 months ago #136523
by Maverick87Shaka
Replied by Maverick87Shaka on topic run php script on completion of a survey
Hi to all,
it's this code valid?
I'm trying to run a custom .php script at the end of survey, but it's seams the survey doesn't execute my script on survey end.
My current version is: 2.50+ Build 160506
Code:
<script type="text/javascript" charset="utf-8"> $(document).ready(function() { $.get('upload/templates/yourTemplateName/survey_end.php'); }); </script>
I'm trying to run a custom .php script at the end of survey, but it's seams the survey doesn't execute my script on survey end.
My current version is: 2.50+ Build 160506
The topic has been locked.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11660
- Thank you received: 2742
7 years 11 months ago #136526
by holch
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Replied by holch on topic run php script on completion of a survey
Why not using the redirect feature of the End url feature and send the participant to your script?
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
The topic has been locked.
- Maverick87Shaka
- Offline
- Senior Member
Less
More
- Posts: 62
- Thank you received: 3
7 years 11 months ago #136528
by Maverick87Shaka
Replied by Maverick87Shaka on topic run php script on completion of a survey
mainly because I don't want to make the users "land" on this different page to run my script.
I don't want that users is able to view the "new" url
And if it's possible, my goal it's to run local script in a determinate path, not exposed on the public internet directory.
In my "vision" I would like to "launch" the execution of the .php script when users click on "finish" button, and show the standard limesurvey end page at the end of survey ( If it's possible I also like to serve the standard end page to the users without wait the execution of the other script )
I don't want that users is able to view the "new" url
And if it's possible, my goal it's to run local script in a determinate path, not exposed on the public internet directory.
In my "vision" I would like to "launch" the execution of the .php script when users click on "finish" button, and show the standard limesurvey end page at the end of survey ( If it's possible I also like to serve the standard end page to the users without wait the execution of the other script )
The topic has been locked.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11660
- Thank you received: 2742
7 years 11 months ago #136529
by holch
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Replied by holch on topic run php script on completion of a survey
Well, then you need to wait if someone else has an idea. I can imagine that running your own PHP within LS is prevented somehow.
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10109
- Thank you received: 3595
7 years 11 months ago #136541
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic run php script on completion of a survey
Try it with an absolute path to the script.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- Maverick87Shaka
- Offline
- Senior Member
Less
More
- Posts: 62
- Thank you received: 3
7 years 11 months ago #136551
by Maverick87Shaka
Replied by Maverick87Shaka on topic run php script on completion of a survey
seams not work for me with absolute path, Now I'm tuning my script to know if it's possible to do what I need!tpartner wrote: Try it with an absolute path to the script.
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13648
- Thank you received: 2491
7 years 11 months ago #136587
by DenisChenu
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic run php script on completion of a survey
Hi,
afterSurveyComplete event is here to do that
But here : please don't answer to a topic 3 years after: the solution can be outdated.
afterSurveyComplete event is here to do that
But here : please don't answer to a topic 3 years after: the solution can be outdated.
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.