- Posts: 19
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
It is possible to set the token attributes FIRSTNAME and LASTNAME to mandatory
- Qsgt
- Topic Author
- Offline
- New Member
Less
More
7 years 4 months ago #144142
by Qsgt
It is possible to set the token attributes FIRSTNAME and LASTNAME to mandatory was created by Qsgt
Hi,
I have a survey that uses tokens and is open for public registration. My public registration form has email, first name and last name fields. However the only mandatory field is email address. Is it possible to set the first and last name fields as mandatory?
I know that I can set custom attributes as mandatory but the FIRSTNAME and LASTNAME attributes and not listed there because they are not custom attributes.
Any ideas as to how/ if I can do it.
Thanks,
qsgt
I have a survey that uses tokens and is open for public registration. My public registration form has email, first name and last name fields. However the only mandatory field is email address. Is it possible to set the first and last name fields as mandatory?
I know that I can set custom attributes as mandatory but the FIRSTNAME and LASTNAME attributes and not listed there because they are not custom attributes.
Any ideas as to how/ if I can do it.
Thanks,
qsgt
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10611
- Thank you received: 3690
7 years 4 months ago #144149
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 It is possible to set the token attributes FIRSTNAME and LASTNAME to mandatory
You could hide the original first and last name fields and add you own mandatory attributes for those.
In LimeSurvey version 2.5x, adding this to the end of template.js will hide those fields.
Alternatively, you may be able to do something with Denis' "replaceRegister" plugin - framagit.org/SondagePro-LimeSurvey-plugin/replaceRegister
In LimeSurvey version 2.5x, adding this to the end of template.js will hide those fields.
Code:
$(document).ready(function() { if($('.register-form #register_firstname').length > 0) { $('.register-form #register_firstname').closest('.form-group').hide(); $('.register-form #register_lastname').closest('.form-group').hide(); } });
Alternatively, you may be able to do something with Denis' "replaceRegister" plugin - framagit.org/SondagePro-LimeSurvey-plugin/replaceRegister
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: Qsgt
The topic has been locked.
- Qsgt
- Topic Author
- Offline
- New Member
Less
More
- Posts: 19
- Thank you received: 0
7 years 4 months ago #144166
by Qsgt
Replied by Qsgt on topic It is possible to set the token attributes FIRSTNAME and LASTNAME to mandatory
Thanks for the suggestions.
I will investigate,
qsgt
I will investigate,
qsgt
The topic has been locked.