Welcome, Guest
Username: Password: Remember me

TOPIC: Can I reorder attribute fields in Registration Form?

Can I reorder attribute fields in Registration Form? 2 months 1 week ago #111796

  • shiyaoliu
  • shiyaoliu's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 2
  • Karma: 0
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!
The administrator has disabled public write access.

Can I reorder attribute fields in Registration Form? 2 months 1 week ago #111814

  • shiyaoliu
  • shiyaoliu's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 2
  • Karma: 0
Find the solution myself. Simply reorder the code sections concerned in /application/helpers/replacement_helper.php
The administrator has disabled public write access.

Can I reorder attribute fields in Registration Form? 2 months 1 week ago #111827

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4297
  • Thank you received: 811
  • Karma: 374
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:

$(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.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.110 seconds
Donation Image