Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Edit the Answertable formatting.

More
5 years 2 weeks ago #204009 by sbgmedia
Hello,

Is it possible to edit the answer table formatting so the answers(Yes, No) are Top aligned and not middle aligned in the cell?

This relates to the Detailed Admin Notification Template.

Thanks in advance,
Kareem
The topic has been locked.
More
5 years 2 weeks ago #204017 by holch
How about a screenshot and the version that is used?

Help us to help you!
  • Provide your LS version and where it is installed (own server, uni/employer, SaaS hosting, etc.).
  • Always provide a LSS file (not LSQ or LSG).
Note: I answer at this forum in my spare time, I'm not a LimeSurvey GmbH employee.
The topic has been locked.
More
5 years 2 weeks ago #204019 by sbgmedia
Hi Holch,

LimeSurvey Version 3.19.2+191017

Attached is a screenshot. I would like to be able to have the "Yes" , "No" top aligned.

The topic has been locked.
More
5 years 2 weeks ago #204020 by holch
To be honest, I would try to do some more formatting, because this is horrible to read.

Maybe have a background color for the cells, or insert borders for the table, which would give the eye some better lead to where a result for a question starts and ends. Probably more helpful than top align the answers.

I am not an expert on the this email reports, but I assume you would have to add some CSS styling into the email template. I don't think it is possible to include external css files, so you probably need to write the css code directly into the email.

Therefore you would have to check how {ANSWERTABLE} is formatted in the final email and see where you can get a hook.

Now the problem that I see is the following. You have 3 ways to include CSS ( www.w3schools.com/css/css_howto.asp ) and to me it seems none of the ways will work in your case.

1. External CSS: Needs to be included into the head of the document, which we don't have access to.

2. Internal CSS: Also needs to be included into the head of the document.

3. Inline CSS: Needs to be included into the tags, which we also do not have access to, as they are within {ANSWERTABLE}

I don't know, maybe Tpartner, Denis or Joffm have an idea or workaround.

Help us to help you!
  • Provide your LS version and where it is installed (own server, uni/employer, SaaS hosting, etc.).
  • Always provide a LSS file (not LSQ or LSG).
Note: I answer at this forum in my spare time, I'm not a LimeSurvey GmbH employee.
The topic has been locked.
More
5 years 2 weeks ago #204021 by sbgmedia
Hi Holch,

Yes you are right, the formatting is horrible, but it is not too important, so long as the answers are there and the votes can be tallied. The main reason I am looking at doing the top align of the answers is to make the process of matching the vote with the motion a bit easier as sometimes the motion is so long that the answer is on the second page due to it being in the middle of a cell that is covering a couple of pages, when printed.

Thanks for you help, hopefully someone else might chime in.
The topic has been locked.
More
5 years 2 weeks ago #204024 by tpartner
Insert something like this at the beginning of the body of the detailed email template:

Code:
<style type="text/css">
 
  table.printouttable {
    border-collapse: collapse;
    border-spacing: 0;
  }
 
  table.printouttable th, 
  table.printouttable td {
    border: 1px solid #ddd;
    padding: 5px 8px;
    vertical-align: top;
  }
</style>


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: holch
The topic has been locked.
More
5 years 2 weeks ago #204025 by holch

Insert something like this at the beginning of the body of the detailed email template:

So you can use "inline CSS" outside of the header? Great to know! I am a little rusty with my HTML and CSS. I really need to work on this again.

Help us to help you!
  • Provide your LS version and where it is installed (own server, uni/employer, SaaS hosting, etc.).
  • Always provide a LSS file (not LSQ or LSG).
Note: I answer at this forum in my spare time, I'm not a LimeSurvey GmbH employee.
The topic has been locked.
More
5 years 2 weeks ago #204026 by tpartner
Yes, but it may not work in all email clients. I tested with Outlook.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
More
5 years 2 weeks ago #204029 by sbgmedia
Hi Tony,

I added the inline CSS and it worked perfectly. Thank you!

BTW, it works on the Mac Mail client.
The topic has been locked.
Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose