Contact form pre-fill message #10603
Labels
META: good first issue
Small/easy change which is a good introduction to working in the WCA repo
TECH: reactJS
Requires knowledge of React
Currently the contact form's 'contact organizer' section's
message
can be prefilled by adding URL parammessage
. At that time, a pre-fill message is also shown (link to code).But this pre-fill message's condition is
contactFormState.formValues?.competition?.message
which means if a user opens contact form fresh, select 'contact organizers' and start typing the message, then this pre-fill message will be shown and this will be totally unrelated at that point.Instead of checking
contactFormState.formValues?.competition?.message
, checking if URL parammessage
is also fine, but that doesn't looks clean because there can be cases wheremessage
is passed as URL param from some other place and it might create conflict.My recommended solution: Along with passing
message
URL param, send one more URL paramtoUpdateRegistration
whose value can betrue
. Then show the pre-fill message only whentoUpdateRegistration === true
.It would also be great to rename the i18n key from
page.contacts.prefilled
topage.contacts.to_update_registration_prefilled
because the current one is too generic and doesn't match with use-case.The text was updated successfully, but these errors were encountered: