Hello,
I am currently developing a plugin to call a payment API. The call to the API is working as expected. Now I have to provide to this API information which are not be part of the registrant’s personal data (i.e. registrant’s VAT number, address with separated fields for street, street number…). Ideally these fields should not be maintained by the conference organizer.
The documentation mentions the event indico.core.signals.event.registration_form_wtform_created
. It seems to be a good candidate to provide new fields to the registration form. Unfortunately, it seems that this event is never fired. I try to connect my plugin to this event in the init
method:
def init(self):
super().init()
self.connect(signals.event.registration_form_wtform_created, self._registration_form_wtform_created)
or with @signals.event.registration_form_wtform_created.connect
without success.
Is there another way to add fields to the registration form? I also tried to use event signals.event.registration_form_created
:
address_section = RegistrationFormSection(registration_form_id=form.id,
type=RegistrationFormItemType.section,
title=_("Address"), is_manager_only=False)
db.session.add(address_section)
db.session.flush()
street_field = RegistrationFormField(parent_id=address_section.id, registration_form=form,
position=1,
title=_("Street"), is_required=True, is_enabled=True, input_type="text",
data={}, versioned_data={})
db.session.add(street_field)
[...]
but, for me, that’s not the way to go. Am I right?
Best regards,
Nicolas