- Posts: 6
- Thank you received: 3
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Modifying printanswers screen to remove PDF option, leave queXMLPDF
- p240901
- Topic Author
- Offline
- New Member
Less
More
5 years 8 months ago - 5 years 8 months ago #171957
by p240901
Modifying printanswers screen to remove PDF option, leave queXMLPDF was created by p240901
Hello there
I'm relatively new to LimeSurvey, and have a question that may have more to do with LimeSurvey's controller/view model.
After completing a survey, LS shows a 'printanswers' page, containing 2 buttons to export at the top: one for PDF and one for queXMLPDF.
I'd like to remove the PDF button, and just leave the queXMLPDF one. I don't need to change functionality, just make the PDF print option invisible on the right page.
Which file would contain this last-page-of-survey layout? I'm guessing it's a /view file somewhere, but am not sure where to look in the LS directories.
Thanks guys
Pete
I'm relatively new to LimeSurvey, and have a question that may have more to do with LimeSurvey's controller/view model.
After completing a survey, LS shows a 'printanswers' page, containing 2 buttons to export at the top: one for PDF and one for queXMLPDF.
I'd like to remove the PDF button, and just leave the queXMLPDF one. I don't need to change functionality, just make the PDF print option invisible on the right page.
Which file would contain this last-page-of-survey layout? I'm guessing it's a /view file somewhere, but am not sure where to look in the LS directories.
Thanks guys
Pete
Last edit: 5 years 8 months ago by p240901.
The topic has been locked.
- LouisGac
- Visitor
5 years 8 months ago #171977
by LouisGac
Replied by LouisGac on topic Modifying printanswers screen to remove PDF option, leave queXMLPDF
here you go:
github.com/LimeSurvey/LimeSurvey/blob/ma...tent/submit.twig#L48
I suggest you read this article too:
manual.limesurvey.org/New_Template_System_in_LS3.x
github.com/LimeSurvey/LimeSurvey/blob/ma...tent/submit.twig#L48
I suggest you read this article too:
manual.limesurvey.org/New_Template_System_in_LS3.x
The topic has been locked.
- p240901
- Topic Author
- Offline
- New Member
Less
More
- Posts: 6
- Thank you received: 3
5 years 8 months ago #171980
by p240901
Replied by p240901 on topic Modifying printanswers screen to remove PDF option, leave queXMLPDF
Thanks LouisGac for those links, which I used to work out how to remove the PDF button at the end of the survey.
For others who might want to do this, here are my instructions:
1. Edit /vanilla/views/subviews/printanswers/printanswers_head.twig
2. Around line 41comment out the export to PDF button:
<!-- remove PDF link, just want queXMLPDF //-->
<!-- PDF
<div class="col-sm-6">
{{ C.Html.form(aSurveyInfo.printAnswersHeadFormUrl, 'post') }}
{{ gT("Export these responses as PDF:") }} <button class="btn btn-default" type="submit">{{ gT("PDF export") }}</button>
{{ C.Html.endForm }}
</div>
//-->
That's it: I'm guessing it's a kind of fudge, but works fine.
Pete
For others who might want to do this, here are my instructions:
1. Edit /vanilla/views/subviews/printanswers/printanswers_head.twig
2. Around line 41comment out the export to PDF button:
<!-- remove PDF link, just want queXMLPDF //-->
<div class="col-sm-6">
{{ C.Html.form(aSurveyInfo.printAnswersHeadFormUrl, 'post') }}
{{ gT("Export these responses as PDF:") }} <button class="btn btn-default" type="submit">{{ gT("PDF export") }}</button>
{{ C.Html.endForm }}
</div>
//-->
That's it: I'm guessing it's a kind of fudge, but works fine.
Pete
The following user(s) said Thank You: LouisGac
The topic has been locked.
- LouisGac
- Visitor
5 years 8 months ago #171981
by LouisGac
Replied by LouisGac on topic Modifying printanswers screen to remove PDF option, leave queXMLPDF
No fudge at all.
LS3 Theme engine has been build for this kind of use
LS3 Theme engine has been build for this kind of use
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10104
- Thank you received: 3593
5 years 8 months ago #171983
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 Modifying printanswers screen to remove PDF option, leave queXMLPDF
Do not edit the core theme twig files, they will be overwritten when updating. Extend the vanilla theme and copy printanswers_head.twig to your new theme directory and edit the copied file.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: DenisChenu, p240901
The topic has been locked.
- p240901
- Topic Author
- Offline
- New Member
Less
More
- Posts: 6
- Thank you received: 3
5 years 8 months ago - 5 years 8 months ago #172328
by p240901
Replied by p240901 on topic Modifying printanswers screen to remove PDF option, leave queXMLPDF
Thanks Tony Partner - as I understand it, I should only be modifying the copied printanswers_head.twig that I have copied to my edited theme, not the original that came with the template. I had some trouble with permissions when copying a theme file to my own theme version, so I copied the file 'manually', and have now made the changes in that new printanswers_head.twig.
Last edit: 5 years 8 months ago by p240901.
The topic has been locked.
- LouisGac
- Visitor
5 years 8 months ago #172350
by LouisGac
Replied by LouisGac on topic Modifying printanswers screen to remove PDF option, leave queXMLPDF
I suggest you read that article:
manual.limesurvey.org/New_Template_System_in_LS3.x
manual.limesurvey.org/New_Template_System_in_LS3.x
The topic has been locked.