Modifying printanswers screen to remove PDF option, leave queXMLPDF

More
4 months 2 weeks ago - 4 months 2 weeks ago #171957 by p240901
p240901 created the topic: Modifying printanswers screen to remove PDF option, leave queXMLPDF
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: 4 months 2 weeks ago by p240901.

Please Log in or Create an account to join the conversation.

More
4 months 2 weeks ago #171977 by LouisGac
LouisGac replied the topic: Modifying printanswers screen to remove PDF option, leave queXMLPDF
The following user(s) said Thank You: tpartner, p240901

Please Log in or Create an account to join the conversation.

More
4 months 2 weeks ago #171980 by p240901
p240901 replied the 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
The following user(s) said Thank You: LouisGac

Please Log in or Create an account to join the conversation.

More
4 months 2 weeks ago #171981 by LouisGac
LouisGac replied the 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

Please Log in or Create an account to join the conversation.

More
4 months 2 weeks ago #171983 by tpartner
tpartner replied the 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

Please Log in or Create an account to join the conversation.

More
4 months 3 days ago - 4 months 3 days ago #172328 by p240901
p240901 replied the 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: 4 months 3 days ago by p240901.

Please Log in or Create an account to join the conversation.

More
4 months 2 days ago #172350 by LouisGac
LouisGac replied the 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

Please Log in or Create an account to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!