Default value for abstract Title

Hello, I hope I am in the right place with this question.

I was wondering what would be the best/easiest to maintain way of setting a default value for the title in the abstract submission form. It would be nice if it could be dynamic but a static value would also be fine.

For our purposes, having to set a title makes no sense, so we’ve currently just hidden the field in the form by changing the title field to a HiddenField in the ".../modules/events/abstracts/forms.py" file.

class AbstractForm(IndicoForm):
    title = HiddenField('Application')

The only issue is that the title field is not instantiated with the default value 'Application', so it is just blank which is kind of a problem ^^

Thank you in advance and kind regards
Michi

try default='Application'. the first argument passed to a field is the label (which is of course useless in case of a hidden field).

And of course the usual warning: Such manual changes will be lost during any Indico update, and they make upgrading more cumbersome, so we recommend against them.

If you really want to modify the Indico core, I highly recommend you to create a fork on GitHub, and maintain your own custom branch into which you can then merge the new release tag whenever there’s a release which you want to update to. Then install your own Python wheel built from that branch (you can re-use our CI build automation for this).

1 Like