- Posts: 2
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Can I reorder attribute fields in Registration Form?
- shiyaoliu
- Topic Author
- Offline
- New Member
Less
More
9 years 6 months ago #111796
by shiyaoliu
Can I reorder attribute fields in Registration Form? was created by shiyaoliu
Hi. I am installing LimeSurvey for an academic social survey, and am wondering whether I can reorder the attribute fields in the registration form?
When I open public registration for a certain survey, those who do not have tokens will need to fill out a registration form before continue with the questionnaire. The order of attributes in the registration form is "First Name" "Last Name" and then "Email". However, since Chinese people usually put "Last Name" first, I would like to reorder it into "Last Name" "First Name" and "Email".
I do not want to change the translation file since it may conflict with email templates (i.e. we still need to call people Mr "Last Name" in formal emails.)
Does anyone know how I can do that? Thank you very much!
When I open public registration for a certain survey, those who do not have tokens will need to fill out a registration form before continue with the questionnaire. The order of attributes in the registration form is "First Name" "Last Name" and then "Email". However, since Chinese people usually put "Last Name" first, I would like to reorder it into "Last Name" "First Name" and "Email".
I do not want to change the translation file since it may conflict with email templates (i.e. we still need to call people Mr "Last Name" in formal emails.)
Does anyone know how I can do that? Thank you very much!
The topic has been locked.
- shiyaoliu
- Topic Author
- Offline
- New Member
Less
More
- Posts: 2
- Thank you received: 0
9 years 6 months ago #111814
by shiyaoliu
Replied by shiyaoliu on topic Can I reorder attribute fields in Registration Form?
Find the solution myself. Simply reorder the code sections concerned in /application/helpers/replacement_helper.php
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10611
- Thank you received: 3691
9 years 6 months ago #111827
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Can I reorder attribute fields in Registration Form?
Rather than hacking the core code (which will be subject to overwriting on updating), I would use JavaScript to move the elements.
Add this to template.js:
.
Add this to template.js:
Code:
$(document).ready(function(){ if($('.register-form-table').length > 0) { $('tr.register-form-fname').before($('tr.register-form-lname')); } });
.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.