HCB Application Form: Deter use of shared email addresses
We already deter users from inviting shared email addresses on HCB.
We should do the same with the application form. This is because emails collected via the form are automatically invited to HCB.
Hey! I would love to work on this issue too @garyhtou.
Go for it! Here is the updated copy that we use on HCB
⚠️ For security, we discourage team emails on HCB. We recommend individual emails such as [email protected]!
Hey @garyhtou, can you comment on the links of the above page where the warning must be added and the source page where it is already being implemented?
Hi @Chay2203!
Warning should be implemented here https://github.com/hackclub/site/blob/905b84666101df3a0bfa2960ba62f745e1e141ee/components/fiscal-sponsorship/apply/personal-form.js#L26-L33
The existing implementation is unfortunately in a closed source codebase.
Sure, works!
Here's the closed-source implementation. You can use it as a guide, however, the implementation we want here will likely be different.
<div x-data="{ email: '' }">
<div class="field flex items-end">
<div class="mr2 flex-auto">
<%= form.label :email %>
<%= form.email_field :email, "x-model": "email" %>
</div>
<%= form.submit "Send" %>
</div>
<template x-if="/^(team|webmaster|marketing|admin|info|about|support|sales|hq|hello)@/.test(email)">
<div class="warning mt1">⚠️ For security, we discourage team emails on HCB. We recommend individual emails such as <em>[email protected]</em>!</div>
</template>
</div>
^ This implementation uses Alpine.js
Sure, will look at it
We're planning to move this form in house @ https://github.com/hackclub/hcb