- Posts: 1
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Default value in email address field when saving a survey response
- aabc
- Topic Author
- Offline
- New Member
Less
More
4 years 9 months ago #186052
by aabc
Jennifer Wright
Default value in email address field when saving a survey response was created by aabc
Hello,
Is it possible to have a default value or auto-filled email address in the email address field on the saving survey screen (screenshot attached) so that the email address doesn't have to be typed in every time a survey response is saved? I only know of the auto-fill options in browser settings.
Thank you,
Jennifer
Is it possible to have a default value or auto-filled email address in the email address field on the saving survey screen (screenshot attached) so that the email address doesn't have to be typed in every time a survey response is saved? I only know of the auto-fill options in browser settings.
Thank you,
Jennifer
Jennifer Wright
Attachments:
The topic has been locked.
- jelo
- Offline
- Platinum Member
Less
More
- Posts: 5070
- Thank you received: 1263
4 years 9 months ago #186056
by jelo
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
Replied by jelo on topic Default value in email address field when saving a survey response
The email address is optional. I wonder why different probands should get the same default/prefilled emailadress which doesn't belong to them.
I'm not aware of the an default email address setting for that page. Never seen a feature request for that page. What is your usecase?
I'm not aware of the an default email address setting for that page. Never seen a feature request for that page. What is your usecase?
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The following user(s) said Thank You: DenisChenu
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10634
- Thank you received: 3698
4 years 9 months ago - 4 years 9 months ago #186082
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 Default value in email address field when saving a survey response
If using tokens, you can set a default value by
extending your theme
and editing the "Email" block of save.twig so it looks something like this:
Code:
<!-- Email --> {% set tokenEmail = processString('{strip_tags(TOKEN:EMAIL)}') %} <div class='{{ aSurveyInfo.class.saveformsurveydive }} form-group ' {{ aSurveyInfo.attr.saveformsurveydive }}> <label class='{{ aSurveyInfo.class.saveformsurveydivelabel }} control-label col-sm-3 ' {{ aSurveyInfo.attr.saveformsurveydivelabel }} > {{ gT("Your email address:") }} </label> <div class='{{ aSurveyInfo.class.saveformsurveydivediv }} col-sm-7 ' {{ aSurveyInfo.attr.saveformsurveydivediv }}> {% set htmlOptions = { 'id' : 'saveemail', 'name' : 'saveemail', 'class' : 'form-control', } %} {{ C.Html.emailField( 'saveemail', ''~tokenEmail~'', (htmlOptions) ) }} </div> </div>
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 4 years 9 months ago by tpartner.
The topic has been locked.