Welcome to the LimeSurvey Community Forum

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

Search Results (Searched for: html)

  • DenisChenu
  • DenisChenu's Avatar
12 Jun 2024 18:45
I have a lot of system with bunch of question hidden :)

Less HTML produced => less code => more quik ;)
  • tpartner
  • tpartner's Avatar
12 Jun 2024 18:20

...or, CSS class d-none.

 
Here we don't need it for JS, then no need HTML produced :)
Understood but I generally use CSS as I manipulate so many questions.
  • DenisChenu
  • DenisChenu's Avatar
12 Jun 2024 17:19

...or, CSS class d-none.
 
Here we don't need it for JS, then no need HTML produced :)
  • DenisChenu
  • DenisChenu's Avatar
12 Jun 2024 08:37
Replied by DenisChenu on topic Can't access my JS code in question text
Did you try on Personal settings : HTML editor mode: to Popup ?
  • Joffm
  • Joffm's Avatar
06 Jun 2024 19:04
Puedes usar la API.
[url] manual.limesurvey.org/RemoteControl_2_API [/url]
[url] api.limesurvey.org/classes/remotecontrol-handle.html [/url]

Crea un script y ejecútalo todos los lunes con un "cronjob". 

Joffm
  • dedukt
  • dedukt's Avatar
05 Jun 2024 17:15
Registration Form was created by dedukt
Please help us help you and fill where relevant:
Your LimeSurvey version: 6.5.11
Own server or LimeSurvey hosting: Own Server
Survey theme/template: fruity_twentythree
==================
We have defined some extra attributes in CPDB as dropdown (e.g. "size_of_company" for better categorization of the results)
The attributes of participants of the survey are assigned.
In registration is only C.Html.textField and it don't seems to be possible to access to the defined dropdown-list?
 
  • Joffm
  • Joffm's Avatar
05 Jun 2024 16:13
Replied by Joffm on topic change question headers in the database

How do I connect to the database through the API?


[url] manual.limesurvey.org/RemoteControl_2_API [/url]
[url] api.limesurvey.org/classes/remotecontrol-handle.html [/url]

and regarding to PowerBi
[url] forums.limesurvey.org/forum/can-i-do-thi...-powerbi-integration [/url]

 
  • dqzhou
  • dqzhou's Avatar
04 Jun 2024 19:20
Hi Joffm,

I check with the Limesurvey, I notice my code is auto-changed to HTML. Even I do not select the box of 'Enable/Disable HTML Tag Autocomplete', it is also auto-picked. That's why you see my HTML structure.
  • Claesmen_515288
  • Claesmen_515288's Avatar
04 Jun 2024 15:42
Set the Participant Setting "Use HTML format for participant emails" to On, fixed the issue.
Not trying to find out how to change the default setting from Off to On
  • Joffm
  • Joffm's Avatar
04 Jun 2024 07:04 - 04 Jun 2024 11:04
Why don't you do what you are told?
You obviously still used the HTML editor.
You see the garbage in the result. Now nobody can see if you ordered the nested quotes correctly.

And did you read this?
[url] getbootstrap.com/docs/5.3/content/images/#responsive-images [/url]
There you see:
Images in Bootstrap are made responsive with .img-fluid. This applies max-width: 100%; and height: auto; to the image so that it scales with the parent width.

So it is not necessary that you set the max-width again to 100%.
You see that I set it to 25%, because yesterday you inserted four images.

I still do not see any issue with this
Code:
<span data-bs-content='<img src="https://www.myserver.de/img/myImage.jpg" class="img-fluid"  alt="">' data-bs-html="true" data-bs-placement="right" data-bs-toggle="popover" data-bs-trigger="hover focus">parcel size </span>
 
<script>
$(function () {
  $('[data-bs-toggle="popover"]').popover();
});
</script>
 
<style type="text/css">
.popover {
  max-width:300px;
}
</style>

 

And, as @tpartner: It's more bootstrap related.

Joffm

BTW: If you use bootstrap, you should use the "Color and background helpers"
[url] getbootstrap.com/docs/5.3/helpers/color-background/ [/url]
"text-success" instead of "good"
"text-danger" insted of "error"
...
  • Joffm
  • Joffm's Avatar
04 Jun 2024 06:38
Replied by Joffm on topic Problem parsing expression script.
You have nested quotes and you used the HTML editor. And that's the problem.

If you do it like this (as you did)
Code:
{if(is_empty(USER_EMAIL.NAOK),"<div class='error'>If you leave email empty, you don't get the report.</div>","")}
the HTML editor changes the single quotes into double quotes to
Code:
{if(is_empty(USER_EMAIL.NAOK),"<div class="error">If you leave email empty, you don't get the report.</div>","")}
Now you get the error.

So either you exchange the order of quotes to
Code:
{if(is_empty(USER_EMAIL.NAOK),'<div class="error">If you leave email empty, you don't get the report.</div>','')}

or - and that is my advice - you use the source code editor







Joffm
  • dqzhou
  • dqzhou's Avatar
03 Jun 2024 23:56
Hi Joffm,

Thank you very much! I adjust your code as follows.

But the new problem happens. As shown in attached picture, there is a long blank space in the explanation box. And I also do not see the relevant code to adjust the box length, and size of inserted pictures. 
 
<span data-bs-content="&lt;img data-cke-saved-src=&quot;/upload/surveys/411885/images/parcelsize_ENG.png&quot; src=&quot;/upload/surveys/411885/images/parcelsize_ENG.png&quot; class=&quot;img-fluid&quot;  alt=&quot;&quot;&gt;" data-bs-html="true" data-bs-placement="right" data-bs-toggle="popover" data-bs-trigger="click hover focus">parcel size </span> <script>
$(function () {
  $('[data-bs-toggle="popover"]').popover();
});
</script>
<style type="text/css">.popover {
  max-width:200px;
}
.img-fluid {
  max-width:100%;
}
</style>
 
  • Joffm
  • Joffm's Avatar
03 Jun 2024 23:23 - 03 Jun 2024 23:28
Hi, I used the example shown in the bootstrap docs.
[url] getbootstrap.com/docs/5.3/components/popovers/ [/url]
As said there 
[url] getbootstrap.com/docs/5.3/content/images/ [/url]
Images in Bootstrap are made responsive with .img-fluid.

So set the popover container to the desired width and enter your images with class="img-fluid".
But in your css set the width to 25% (four images)

width of popover: 400px
 

width of popover: 800px
 

Better use the source code editor to enter the code. The HTML editor seems to spoil it.
Code:
<span data-bs-content='<img src="https://www.mysurvey.de/userfiles/Hamburg-Ballett_02.jpg"  class="img-fluid" ><img src="https://www.mysurvey.de/userfiles/Hamburg-Ballett_05.jpg"  class="img-fluid"><img src="https://www.mysurvey.de/userfiles/Hamburg-Ballett_16.jpg" class="img-fluid" alt=""><img src="https://www.mysurvey.de/userfiles/Hamburg-Ballett_10.jpg" class="img-fluid"  alt="">' data-bs-toggle="popover" data-bs-trigger="hover focus" data-bs-placement="right" data-bs-html="true" >Ballett Scenes </span>
 
<script>
$(function () {
  $('[data-bs-toggle="popover"]').popover();
});
</script>
 
<style type="text/css">
.popover {
  max-width:800px;
}
.img-fluid {
  max-width:25%;
}
</style>


Joffm
I hope I did not misunderstand.
  • dqzhou
  • dqzhou's Avatar
03 Jun 2024 20:51
Please help us help you and fill where relevant:
Your LimeSurvey version: Version 6.5.9 
Own server or LimeSurvey hosting:
Survey theme/template:
==================
Hi,

I am considering to put the picture into the explanation box of clickable words. For insert text into explanation box, i use the following code which is fine:

<a data-bs-content="xxxxxx" data-bs-placement="top" data-bs-toggle="popover" data-bs-trigger="hover focus" role="button" tabindex="0" title="xx">xx </a> <script>
$(function () {
  $('[data-bs-toggle="popover"]').popover();
});
</script>

But this code is difficult to add the picture into it. I use the following code, which cannot adjust the size of picture. It is showed in the attached picture.

<a data-bs-content="&lt;img  data-cke-saved-src='/upload/surveys/411885/images/parcelsize_ENG.png' src='/upload/surveys/411885/images/parcelsize_ENG.png' style='width: 10px; height: 10px;' /&gt;" data-bs-placement="top" data-bs-toggle="popover" data-bs-trigger="hover focus" id="popoverTrigger" role="button" tabindex="0">Parcel size</a> <script>
  // Initialize popover
  var popoverTrigger = document.getElementById('popoverTrigger');
  var popover = new bootstrap.Popover(popoverTrigger, {
    html: true
  });
</script>
 
Can you help me to solve this problem?
  • linuxhooligan
  • linuxhooligan's Avatar
03 Jun 2024 14:25
Aha! Okay, updates.

For any noobs getting up to speed, here is what you should keep in mind:

1) Install pdfReport and limeMpdf using the plugin manager.

2) Import the sample survey from the pdfReport demo folder.

Everything will work perfectly on Lime survey 5.x, there are no actual issues. Where I as a novice had to work a little bit is figuring out where the important components are that tweak the behaviour in various ways. For example:

* Setting the survey to "allow users to print answers' is one important feature.

* Setting the "Replace public print answer" in the report question is also important.

* Setting the Email reply templates is useful as well.

* It is also important tor realize that the file upload question is what is used for the report and this is where you generate your report.

* You can create a basic report using the question html editor on the page, but if you have limeMpdf plugin installed, you can construct a whole report using a set of supported Bootstrap html tags, text and expression script.

* The PDF help file is incredibly well documented and provides excellent references for what is possible.

* Of course, you have to setup your email settings successfully in Global Settings in order for the pdf to be attached and emailed.

Once setup, everything works perfectly.

Denis and team, this is an amazing set of plugins. Please ignore my post just prior to this one, I did not fully understand that those questions referred to settings in the sample survey provided. That was a perfect demo of what can be done and I have it working as we need it on a new survey just great.

Very much appreciate this plugin, this solved a huge challenge for us.
Displaying 1 - 15 out of 4771 results.

Lime-years ahead

Online-surveys for every purse and purpose