Create a new Indico profile - field “affiliation” required, is it possible?

I have a question about the “create a new Indico profile” process. What can I do to make the field “affiliation” required, during the create a new Indico profile ? Is there such a possibility in the Indico ver. 2

No, this is currently not possible - after all, people might just put “User”, “n/a”, “-” or similar nonsense there if it was required.

Your best choice is probably to enable moderation and reject account creation requests that do not contain an affiliation…

A dirty way:

change line 91 in file /opt/indico/.venv/lib/python2.7/site-packages/indico/modules/auth/forms.py (assuming production setup)

from
affiliation = StringField(_('Affiliation'))
into
affiliation = StringField(_('Affiliation'), [DataRequired()])

Thanks @kopycisko
I followed your advice and it worked perfectly, but the Affiliation field will not be validated until I click the “Create Profile” button. I believe that html must be modified.

The tip above no longer works in current Indico versions. At least when you use moderated account creation we now have a proper setting to make the affiliation field mandatory, but I don’t think we have a similar option during immediate (unmoderated) account creation…

1 Like

Thanks for your quick reply. Its work fine with indico 3.2.3. This issue with the old indico 3.2.
I will upgrade indico to resolve this issue.

Regards