{"id":13556450,"url":"https://github.com/thestackshack/serverless-contact-us-form","last_synced_at":"2025-04-03T10:30:40.766Z","repository":{"id":218094810,"uuid":"100640618","full_name":"thestackshack/serverless-contact-us-form","owner":"thestackshack","description":"Simple Contact Us form for static websites","archived":false,"fork":false,"pushed_at":"2017-08-21T12:36:07.000Z","size":6,"stargazers_count":20,"open_issues_count":3,"forks_count":47,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-11-04T06:34:48.193Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thestackshack.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-08-17T20:01:39.000Z","updated_at":"2024-04-20T14:12:42.000Z","dependencies_parsed_at":null,"dependency_job_id":"bd4d1920-dc76-4141-9c62-878ce52faf63","html_url":"https://github.com/thestackshack/serverless-contact-us-form","commit_stats":null,"previous_names":["thestackshack/serverless-contact-us-form"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thestackshack%2Fserverless-contact-us-form","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thestackshack%2Fserverless-contact-us-form/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thestackshack%2Fserverless-contact-us-form/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thestackshack%2Fserverless-contact-us-form/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thestackshack","download_url":"https://codeload.github.com/thestackshack/serverless-contact-us-form/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246984420,"owners_count":20864438,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T12:03:50.677Z","updated_at":"2025-04-03T10:30:40.366Z","avatar_url":"https://github.com/thestackshack.png","language":null,"funding_links":[],"categories":["Others","others"],"sub_categories":[],"readme":"# Serverless Contact Us Form\n\nThe template: [cloudformation.yml](cloudformation.yml)\n\nQuickly deploy an endpoint to handle your `contact us` form on your static website.  We don't want to have servers running just to handle our `contact us` form which rarely gets invoked.  Oh, and we also need Captcha because we don't have time in our lives for spam.\n\n\u003ca href=\"https://console.aws.amazon.com/cloudformation/home#/stacks/new?stackName=\u0026templateURL=https://s3.amazonaws.com/thestackshack/serverless-contact-us-form/cloudformation.yml\"\u003e\u003cimg src=\"https://s3.amazonaws.com/cloudformation-examples/cloudformation-launch-stack.png\"/\u003e\u003c/a\u003e\n\nYou can get your reCAPTCHA secret here:  https://www.google.com/recaptcha/admin#list\n\n## What AWS resources does this template use?\n* Lambda (API Function)\n* API Gateway (HTTP proxy to Lambda)\n* S3 (Lambda files)\n* SES (Send us the email)\n* CodeCommit (GIT repo)\n* CloudFormation (Infrastructure as Code)\n* IAM (AWS permissions \u0026 users)\n\n## HTML Form\n```\n\u003cform action=\"\u003cyour api gateway url\u003e\" method=\"POST\" id=\"contact-us-form\"\u003e\n    \u003cdiv class=\"form-group\"\u003e\n        \u003clabel for=\"nameInputEmail1\"\u003eName\u003c/label\u003e\n        \u003cinput type=\"text\" class=\"form-control\" id=\"nameInputEmail1\" name=\"name\" placeholder=\"Full name\"\u003e\n    \u003c/div\u003e\n    \u003cdiv class=\"form-group\"\u003e\n        \u003clabel for=\"exampleInputEmail1\"\u003eEmail address\u003c/label\u003e\n        \u003cinput type=\"email\" class=\"form-control\" id=\"exampleInputEmail1\" name=\"email\"\n               placeholder=\"Enter email\"\u003e\n    \u003c/div\u003e\n    \u003cdiv class=\"form-group\"\u003e\n        \u003clabel for=\"phoneInputEmail1\"\u003ePhone number\u003c/label\u003e\n        \u003cinput type=\"text\" class=\"form-control\" id=\"phoneInputEmail1\" name=\"phone\"\n               placeholder=\"Enter phone\"\u003e\n    \u003c/div\u003e\n    \u003cdiv class=\"form-group\"\u003e\n        \u003clabel for=\"messageInputEmail1\"\u003eMessage\u003c/label\u003e\n        \u003ctextarea type=\"textarea\" class=\"form-control\" id=\"messageInputEmail1\" name=\"message\"\n                  placeholder=\"Enter message\"\u003e\u003c/textarea\u003e\n    \u003c/div\u003e\n    \u003cp class=\"thanks\"\u003eThanks!  We'll contact you soon.\u003c/p\u003e\n    \u003cbutton type=\"submit\" class=\"btn btn-primary g-recaptcha\"\n      data-sitekey=\"6LdrWS0UAAAAAPAokGKpRhrObJkaaCX0EMsEiofN\"\n      data-callback=\"onContctUsSubmit\" data-badge=\"inline\" \u003eSubmit\u003c/button\u003e\n\u003c/form\u003e\n```\nJQuery example...\n```\n$.post($(\"#contact-us-form\").attr('action'), JSON.stringify({\n    name: $(\"#contact-us-form input[name='name']\").val(),\n    email: $(\"#contact-us-form input[name='email']\").val(),\n    phone: $(\"#contact-us-form input[name='phone']\").val(),\n    message: $(\"#contact-us-form textarea[name='message']\").val(),\n    'g-recaptcha-response': $(\"#contact-us-form textarea[name='g-recaptcha-response']\").val()\n}), function (data) {\n    $(\".thanks\").show();\n    $(\"#contact-us-form button\").hide();\n}, 'json');\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthestackshack%2Fserverless-contact-us-form","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthestackshack%2Fserverless-contact-us-form","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthestackshack%2Fserverless-contact-us-form/lists"}