Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Contact form pre-fill message #10603

Open
danieljames-dj opened this issue Jan 12, 2025 · 2 comments
Open

Contact form pre-fill message #10603

danieljames-dj opened this issue Jan 12, 2025 · 2 comments
Assignees
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

Comments

@danieljames-dj
Copy link
Member

Currently the contact form's 'contact organizer' section's message can be prefilled by adding URL param message. 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 param message is also fine, but that doesn't looks clean because there can be cases where message 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 param toUpdateRegistration whose value can be true. Then show the pre-fill message only when toUpdateRegistration === true.

It would also be great to rename the i18n key from page.contacts.prefilled to page.contacts.to_update_registration_prefilled because the current one is too generic and doesn't match with use-case.

@dunkOnIT dunkOnIT added META: good first issue Small/easy change which is a good introduction to working in the WCA repo TECH: reactJS Requires knowledge of React labels Jan 12, 2025
@scifisatan
Copy link

hey can i get assigned to this issue?

@danieljames-dj
Copy link
Member Author

Sure @scifisatan, thanks for your interest. You can start working on it, and let us know in comments if you face any issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

No branches or pull requests

3 participants