sylveon / discord-ban-appeals

Sample ban appeals page with OAuth2 integration
https://discord-ban-appeal-preview.netlify.app/
MIT License
137 stars 45 forks source link

How to add more text fields? #33

Closed imaginativess closed 2 years ago

imaginativess commented 2 years ago

I managed to customize the site, but how do I duplicate the question fields and still make it send to the embed?

sylveon commented 2 years ago

In form.html, make a copy of this https://github.com/sylveon/discord-ban-appeals/blob/8541245a133cb2e1a6bfcae01f4364dab8cba770/public/form.html#L40-L46

Then, update the for, id and name fields to a identifier of your liking.

Add your field here: https://github.com/sylveon/discord-ban-appeals/blob/8541245a133cb2e1a6bfcae01f4364dab8cba770/func/submission-created.js#L21-L23

and here: https://github.com/sylveon/discord-ban-appeals/blob/8541245a133cb2e1a6bfcae01f4364dab8cba770/func/submission-created.js#L28-L30

Then you can add it to the embed that is submitted by the script here: https://github.com/sylveon/discord-ban-appeals/blob/8541245a133cb2e1a6bfcae01f4364dab8cba770/func/submission-created.js#L54-L65