I just upgraded Indico to v3.2.
I would like to make a few changes to the registration form. In particular, I would like to change the final text area description and make that field ‘required’.
In the previous versions of Indico I just modified the description by changing the comment in /opt/indico/.venv/lib/python3.9/site-packages/indico/modules/auth/forms.py for LocalRegistrationForm and MultipassRegistrationForm classes.
From v3.2 I see that all has been migrated to js and is packaged as dist files.
The corresponding source file on the github repo should be this one: indico/signup.jsx at master · indico/indico · GitHub
I just want to change the text in line 203 and add make the FinalTextArea required.
Is this possible?
Thank you in advance for your time.
No need to. Look at this:
You can make the comment field in case of registration requests required without code changes. Simply go to Admin → User management → Users (
/admin/users/), click the cog icon and you should be able to open the settings there where you can mark that field as required.
Great! Thank you very much!
I set the comment field as mandatory.
But I’m not sure I can change the description text of that field without touching the code.
Look at the highlighted text in the picture here below.
Thank you for your time
Correct, to edit that you’d need to edit the .jsx file and then build your own indico wheel and install that.
If you want to do that, you need to set up a local indico dev environment (see the setup guide), make the change to the file, and then build the wheel using
./bin/maintenance/build-wheel.py indico --add-version-suffix.
You can then copy that wheel to your server and
pip install indico-....whl it into the indico venv.
What change do you want to make there? Just to see if we should consider making this more customizable…
thank you very much for the instructions!
I would like to change the original description text with something like this:
Dear user, in order to process your request regarding the access to the Indico system, p
lease let us know which event you are interested in, as well as a reference person at name_of_the_organization we may contact for reference. Thank you.
It would also be nice to set the color and the style of the text (e.g. red and bold), but this is a plus.
Would a “freetext” message shown somewhere on the page suffice? I’d be open to adding a setting where you can write markdown (which includes limited HTML as well). Just not sure whether to use it as a custom description for that field or rather a general message shown on that page.
PS: Unless you want to use the call for abstract, “interested in an event” does not require an Indico account - you can configure event registration forms to accept registrations from users without an account (in fact that’s the default).
Yes, I think this should be a good compromise.
So, let me summarize to see if I have understood correctly. The solution could be:
- Set the comment field as mandatory (done)
- Add a text message somewhere on the registration page which tells to the users that the comment field is mandatory and what information needs to be written there.
Regarding the PS, yes, we use moderated registration only for creating accounts, not to register to events, but also in this case we want to know the name of the event by the users.
I think adapting the message in case it’s mandatory is a no-brainer and something we can easily add to the next release.
For adding a custom message I still have to think about whether to allow replacing the field description or just show a generic message. I’m more leaning towards the latter since that’s what we do in other places as well…
Thank you very much for the support.