Modify Label

More
2 years 5 months ago #146221 by leblancoj
Modify Label was created by leblancoj
Hello, I'm New to this world of LimeSurvey.
I'm trying to edit some tags, but I have no idea if I'm on the right track, I am in the option of Survey participants.



Can I change the "Password(Contraseña)" tag? To say "RUT",




My intention is:

Have a text field where the user can add some identifier number and is validated in the database to enter the survey, as there is already a default "password" I would like to change the label and customize it, but I do not succeed, I wanted to edit The source code but I did not get the file to do it.

Can I do this?

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

LimeSurvey Partners
More
2 years 5 months ago #146250 by holch
Replied by holch on topic Modify Label
You should not change the source. These strings are saved in the language files anyway. So you could create a specific language translation for your installation. Or maybe you can change the string via Javascript, which is probably easier if you only want to change this one string. But with the Javascript solution someone else will have to help.

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

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

More
2 years 5 months ago #146258 by leblancoj
Replied by leblancoj on topic Modify Label
As the image shows, access to the survey is restricted and you must enter the password to validate the access and enter. Can be another security token to validate? Like the mail?

Can you do it from the LimeSurvery administration or do you need to alter the source code?

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

More
2 years 5 months ago #146260 by holch
Replied by holch on topic Modify Label
Sorry, now you got me confused. From your first post I understood that you would like to rename "Contraseña" into "RUT". This can be either done by modifying the translation of your chosen language or maybe with a javascript code. I don't get what you want to say with your new post.

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

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

More
2 years 5 months ago #146261 by tpartner
Replied by tpartner on topic Modify Label
To change the label for the token input without going to translations, add something like this to the end of template.js:

$(document).ready(function() {
	if($('#tokenform').length > 0) {
		$('label[for="token"]').text('New Label');
	}
});


Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Official LimeSurvey Partner - partnersurveys.com
Attachments:

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

More
2 years 5 months ago #146263 by leblancoj
Replied by leblancoj on topic Modify Label
OMG!!!! I'll try it and report it

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

More
2 years 5 months ago #146277 by leblancoj
Replied by leblancoj on topic Modify Label
tpartner:
Add the JS code in template.js at the end but nothing happens :( I'm doing something wrong? Sorry if that's so, I'm new to LimeSurvey

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

More
2 years 5 months ago #146279 by leblancoj
Replied by leblancoj on topic Modify Label
How can I edit the source code for this form?

I want to change the field where the "password" is entered to enter alphanumeric characters and remove the ************ asterisks that hide what one writes

www.limesurvey.org/media/kunena/attachme...0-11-12-13-14-15.png

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

More
2 years 5 months ago - 2 years 5 months ago #146281 by Ben_V
Replied by Ben_V on topic Modify Label

leblancoj wrote: Add the JS code in template.js at the end but nothing happens I'm doing something wrong?


perhaps a browser cache issue... retry after clearing it ;)

leblancoj wrote: I want to change the field where the "password" is entered to enter alphanumeric characters and remove the ************ asterisks that hide what one writes


adapting Tony's script:
$(document).ready(function() {
 	            if ($('#tokenform').length > 0) {
 	                $('label[for="token"]').text('RUT');
 	                $('input.text').attr("type","text").removeAttr('type');
 	            }
	});

Benoît

EM Variables => bit.ly/1TKQyNu | EM Roadmap => bit.ly/1UTrOB4
Last Releases => 2.6x.x goo.gl/ztWfIV | 2.06/2.6.x => bit.ly/1Qv44A1
Demo Surveys => goo.gl/HuR6Xe (already included in /docs/demosurveys)
Last edit: 2 years 5 months ago by Ben_V.

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

More
2 years 5 months ago #146283 by leblancoj
Replied by leblancoj on topic Modify Label

Ben_V wrote:

leblancoj wrote: Add the JS code in template.js at the end but nothing happens I'm doing something wrong?


perhaps a browser cache issue... retry after clearing it ;)

leblancoj wrote: I want to change the field where the "password" is entered to enter alphanumeric characters and remove the ************ asterisks that hide what one writes


adapting Tony's script:
$(document).ready(function() {
 	            if ($('#tokenform').length > 0) {
 	                $('label[for="token"]').text('RUT');
 	                $('input.text').attr("type","text").removeAttr('type');
 	            }
	});



It does not work, save the JS at the end of the template.js as the image shows and still does not show any changes, clear the entire browser cache
I set the default custom template on my menu but nothing!



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

More
2 years 5 months ago #146284 by Ben_V
Replied by Ben_V on topic Modify Label
so try to embed the script into your endpage.pstpl file :
<script>
$(document).ready(function() {
 	            if ($('#tokenform').length > 0) {
 	                $('label[for="token"]').text('RUT');
 	                $('input.text').attr("type","text").removeAttr('type');
 	            }
	});
</script>

Benoît

EM Variables => bit.ly/1TKQyNu | EM Roadmap => bit.ly/1UTrOB4
Last Releases => 2.6x.x goo.gl/ztWfIV | 2.06/2.6.x => bit.ly/1Qv44A1
Demo Surveys => goo.gl/HuR6Xe (already included in /docs/demosurveys)

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

More
2 years 5 months ago #146287 by tpartner
Replied by tpartner on topic Modify Label

It does not work, save the JS at the end of the template.js as the image shows and still does not show any changes, clear the entire browser cache

In /application/config/config.php, set debug to 1 so all files are loaded directly, not via the assets manager.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Official LimeSurvey Partner - partnersurveys.com

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

More
2 years 5 months ago #146289 by leblancoj
Replied by leblancoj on topic Modify Label
Ben_V: Add the script where you indicated, and I did not use it, I do not know what to try anymore. I have half a day trying and it does not work, it causes me frustration, I can not edit the source code of that form? Only accept JS to be able to modify it?

tpartner: I set debug to 1 and nothing happens.



Friends, restarting my WEB server is the only thing I can think of! :'(
Attachments:

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

More
2 years 5 months ago - 2 years 5 months ago #146290 by leblancoj
Replied by leblancoj on topic Modify Label
I made it!!!!!!!!


Last edit: 2 years 5 months ago by leblancoj. Reason: Image

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

More
2 years 5 months ago - 2 years 5 months ago #146291 by leblancoj
Replied by leblancoj on topic Modify Label
YEAAAAAH! :laugh: :laugh: :cheer: :laugh: ;)

My error was that I had not set the default template for my "Active"



I would like to make other inquiries, I hope they can help me and thank you for your time.
  1. I would like to change what is written in the blue box, for 1 word or 1 image.
  2. I would like to delete the Captchar, that my users are validated without it, they are users with 60 years of age and it is difficult



Can it be done?
Last edit: 2 years 5 months ago by leblancoj. Reason: Text = Can it be done?

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!