Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Add extra question for registration

  • TomTomT
  • TomTomT's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
2 years 2 months ago - 2 years 2 months ago #227518 by TomTomT
Add extra question for registration was created by TomTomT
Hello, I am trying to add an extra question to the registration of my survey, I found this in the registration_form.twig file of my Vanilla theme (you can see it here) . However I have no Idea how to make it work.
Could you give me an example with an attribute_1 for example? (sorry for the newbiness)

Code:
{% for key, aExtraAttribute in aSurveyInfo.aExtraAttributes  %}
            <div class=' {{ aSurveyInfo.class.registerformextras }} form-group row' {{ aSurveyInfo.attr.registerformextras }} >
                {% set registerKey = "register_" ~ key %}
                <label for="{{ registerKey }}" class='{{ aSurveyInfo.class.registerformextraslabel }} control-label '> {{ aExtraAttribute.caption }} {% if aExtraAttribute.mandatory == 'Y' %}{{ include('./subviews/registration/required.twig') }}{% endif %}</label>
                <div {{ aSurveyInfo.attr.registerformcolrowcdiv }} >
                    {{ C.Html.textField(registerKey, aSurveyInfo.aAttribute[key],({'id' : registerKey,'class' : 'form-control input-sm'})) }}
                </div>
            </div>
        {% endfor %}


Thanks
Last edit: 2 years 2 months ago by TomTomT.

Please Log in to join the conversation.

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 2 months ago #227520 by tpartner
Replied by tpartner on topic Add extra question for registration
There is a built-in setting to show attributes in the register form.

- manual.limesurvey.org/Survey_participants/en#Manage_attributes

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: TomTomT

Please Log in to join the conversation.

  • TomTomT
  • TomTomT's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
2 years 2 months ago #227521 by TomTomT
Replied by TomTomT on topic Add extra question for registration
How silly of me... thanks a lot

Please Log in to join the conversation.

Lime-years ahead

Online-surveys for every purse and purpose