Welcome to the LimeSurvey Community Forum

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

Progress bar

  • Volvic
  • Volvic's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
2 years 11 months ago #229373 by Volvic
Progress bar was created by Volvic
Please help us help you and fill where relevant:
Your LimeSurvey version: 5.3.17
Own server or LimeSurvey hosting: LimeSurvey hosting
Survey theme/template: Bootswatch
==================
Hi all, 

Is it possible to move the progress bar to the bottom (right or left) corner and make it way smaller? How can I adjust such setting? Right now the progress bar takes a lot of space in my opinion. 

Thanks in advance

 

Please Log in to join the conversation.

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 11 months ago #229374 by tpartner
Replied by tpartner on topic Progress bar
1) Extend the theme.

2) Remove the contents of progress_bar.twig.

3) Add something like this to the end of footer.twig:

Code:
{% if aSurveyInfo.showprogress == 'Y' and aSurveyInfo.format != 'A' and not aSurveyInfo.aCompleted %}
    <!-- Top container -->
    <div class="inserted-progress-container space-col col-sm-3"  {{ aSurveyInfo.attr.topcontainer  }} >
        <div class="{{ aSurveyInfo.class.topcontent  }} container-fluid" {{ aSurveyInfo.attr.topcontent  }} >
            {% set progressValue  = ( aSurveyInfo.progress.total > 0 ) ? intval( (aSurveyInfo.progress.currentstep - 1) / aSurveyInfo.progress.total * 100 ) : 0 %}
            <div class="sr-only">{{ sprintf(gT('You have completed %s%% of this survey'),progressValue) }}</div>
                <div class="{{ aSurveyInfo.class.progress  }}" {{ aSurveyInfo.attr.progress  }}  aria-hidden="true">
                    <div class="{{ aSurveyInfo.class.progressbar  }}" {{ aSurveyInfo.attr.progressbar  }} style="min-width: 2em; width: {{ progressValue }}%;">
                        {{ progressValue }}%
                    </div>
                </div>
        </div>
    </div>
{% endif %}

4) Add something like this to the end of custom.css:
 
 
Code:
.inserted-progress-container .progress {
    height: 21px;
}

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: polbarbe95

Please Log in to join the conversation.

More
2 years 11 months ago #229405 by polbarbe95
Replied by polbarbe95 on topic Progress bar
Thank you so much tpartner. This code did the trick!! Awesome

All the best

Please Log in to join the conversation.

More
2 years 11 months ago #229407 by polbarbe95
Replied by polbarbe95 on topic Progress bar
Actually, I do have a follow up question. In order to move the progress bar to the bottom right of the page, which line of the code should I change? Also it is possible to include two progress_bar variations? As I would also like to include this  to hide the progress bar in the first page. 

Many thanks
 

Please Log in to join the conversation.

Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose