Welcome to the LimeSurvey Community Forum

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

Change the position of the next button only on the welcome page

  • mfroehler
  • mfroehler's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 5 months ago #207370 by mfroehler
Hello again,

is it possible to change the position of the submit button to the left hand side only on the welcome page?

I'm still suing an extended fruity on 3.15.

I changed the text of my button with using a script like this in the source of a text, which works great.

<script type="text/javascript" charset="utf-8">
$(document).on('ready pjax:scriptcomplete',function(){
$('#ls-button-submit').text("LOS GEHT'S");
});
</script>

I tried doing the change in the navigation twig, but I only succeeded in changing it on all pages, which isn't my intent.

Best regards
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 5 months ago - 3 years 5 months ago #207374 by tpartner
Try this:

Code:
<script type="text/javascript" charset="utf-8">
  $(document).on('ready pjax:scriptcomplete',function(){
    $('#ls-button-submit').text("LOS GEHT'S").appendTo($('#navigator-container > .text-left:eq(0)'));
  });
</script>

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 3 years 5 months ago by tpartner.
The topic has been locked.
  • mfroehler
  • mfroehler's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 5 months ago #207376 by mfroehler
Perfect!
Thanks a lot!
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 5 months ago - 3 years 5 months ago #207378 by Joffm
Of course this is better.
Therefore I removed my (longer) solution.

I didn't know how to use the "appendTo".

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 3 years 5 months ago by Joffm.
The topic has been locked.
  • mfroehler
  • mfroehler's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 5 months ago #207423 by mfroehler
Just a quick follow up:

While the button sits to the left now, it sits right at the border of my container.
And it seems I'm too dumb to add a padding to it.

Can I give the button an id with JS, or can I attach a padding there, because so far my CSS changes don't seem to work.

Thanks again.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 5 months ago - 3 years 5 months ago #207430 by tpartner
It looks fine to me in vanilla, what theme are you using?

It already has an ID #ls-button-submit. You should be giving it some left margin, not padding.

Code:
#navigator-container > .text-left #ls-button-submit {
    margin-left: 1.5em;
}

Can you activate a sample survey so we can see what styles are affecting it?

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 3 years 5 months ago by tpartner.
The topic has been locked.
  • mfroehler
  • mfroehler's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 5 months ago #207433 by mfroehler
Works like a charm. It was for sure a problem on my side.

Thanks to you all might be able to get this survey to look nice before the go-live date. ;)
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose