Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Added a React version of index.js and form-submission-handler.js#453

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
autumn-lindberg wants to merge39 commits intodwyl:add-clasp
base:add-clasp
Choose a base branch
Loading
fromautumn-lindberg:master

Conversation

autumn-lindberg
Copy link

Hi there!

This is an amazing project and I'd love to do some work on it if you'd allow me.

Here is a basic implementation of how your project could be implemented into a React component.
No dependencies, validation is using regex. Submit button is disabled until input passes regex validation. Only one input is used, but the basic idea is there. I know this isn't the right branch to post it on, but I'd love to know your thoughts!

Please accept my humble PR ❤️

mckennapseanand others added30 commitsFebruary 18, 2019 18:59
Add a GDPR note at the top of the README, addressesdwyl#217
Reset the web form on successful submission,fixesdwyl#283
The HTML 5 form input type of email already handlesemail validation. There are cases that are allowed byHTML5 (e.g., "a@a") which our form used to detectand notify the user. Since these are less likely tohappen, and the logic is still not fool-proof, simplifythe code and assumptions made therein to bemore generalizable and thus more robust. This issupported in all modern browsers, and I testedthis also in Edge to verify that it works there, too.https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/email
Remove unnecessary steps in the readme by includinghoneypot spam prevention by default in the script.Works just fine if no honeypot field is present, sincethe falsey or empty behavior also means the form issubmitted. This just makes it easier for users to takeour example and get this feature for free rather thanneeding to go through steps and having commentedout code in our sample script. Also fixes a bug sincefiltering out the honeypot meant that the honeypotdata was no longer being used and was thus broken.
Remove unnecessary form validation for email
The `validateHuman` function is coded inside `handleFormSubmit` on line 61, so it's not necessary (and not used).
Fix IE with JS since object keys must be defined but only in IE
* Ensure XHR success before clearing the formThanks to@tarasyarema for discovering the fix for this.Originally pulled from PRdwyl#315. Makes sure that theXHR request is completed and successful before clearingand hiding the form.* Remove extraneous console loggingCleans up console output. Manual logging canbe added by users themselves as desired.* Remove old honeypot function (dead code)Removed as part of another PR, but I forgot toremove the unused function. It just checks if thereis a value and returns the result of that if statement,with unnecessary logging, so clean that all up.
Make it more natural
Delete English part
Add translation link
Spanish -> Español
Add translation link
Add language-change part in the README files
The attribute name in the JS did not match what the google script was looking for.
Co-authored-by: Ines Teles Correia <iteles@users.noreply.github.com>
* Add-FAQ-to-README* Address Sean's code review feedback for FAQ (dwyl#344)Co-authored-by: athenaozanich <athenaozanich@gmail.com>
Google Apps Script released a new version of the web IDE, and these changes are what is needed to get the steps up to date for the latest editor.
@mckennapsean
Copy link
Collaborator

thanks for the contribution & getting a working example going with React!

over the years, folks have been quite curious about React (#213,#308,#336,#411) and other frameworks (#254). Clearly, you are among good company :)

what I might suggest:

  • separate branch just for a react-demo, or some other code hosted solution (gist, codepen, etc.) -- this could be on a fork of the repo too, if you'd rather maintain it personally.
  • add a link on the main repo (maybe in a new Q&A at the bottom?) to the main trunk

does that seem do-able? do you have a preference on where to store the react example?

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

7 participants
@autumn-lindberg@mckennapsean@nelsonic@GimunLee@dalton-cole@cristianofromagio@Arhell

[8]ページ先頭

©2009-2025 Movatter.jp