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
  • p240901's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
5 years 8 months ago - 5 years 8 months ago #171957 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
Last edit: 5 years 8 months ago by p240901.
The topic has been locked.
  • LouisGac
  • LouisGac's Avatar
  • Visitor
  • Visitor
5 years 8 months ago #171977 by LouisGac
The topic has been locked.
  • p240901
  • p240901's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
5 years 8 months ago #171980 by p240901
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
The following user(s) said Thank You: LouisGac
The topic has been locked.
  • LouisGac
  • LouisGac's Avatar
  • Visitor
  • Visitor
5 years 8 months ago #171981 by LouisGac
No fudge at all.
LS3 Theme engine has been build for this kind of use
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 8 months ago #171983 by tpartner
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
  • p240901's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
5 years 8 months ago - 5 years 8 months ago #172328 by p240901
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
  • LouisGac's Avatar
  • Visitor
  • Visitor
5 years 8 months ago #172350 by LouisGac
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose