<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Sandeep Rajaram</title>
    <description>The latest articles on DEV Community by Sandeep Rajaram (@rajaramsandeep).</description>
    <link>https://dev.to/rajaramsandeep</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F450078%2F1b6ca0d3-e475-40e8-aa90-753dd20f3d32.jpg</url>
      <title>DEV Community: Sandeep Rajaram</title>
      <link>https://dev.to/rajaramsandeep</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/rajaramsandeep"/>
    <language>en</language>
    <item>
      <title>How to add a contact form to a Static Website</title>
      <dc:creator>Sandeep Rajaram</dc:creator>
      <pubDate>Mon, 10 Aug 2020 11:29:17 +0000</pubDate>
      <link>https://dev.to/rajaramsandeep/how-to-add-a-contact-form-to-a-static-website-174o</link>
      <guid>https://dev.to/rajaramsandeep/how-to-add-a-contact-form-to-a-static-website-174o</guid>
      <description>&lt;p&gt;&lt;strong&gt;Static sites aren’t static anymore.&lt;/strong&gt; With the rise of modern web technologies, you can build dynamic functionality to your sites. They are fast, reliable, scalable, secure and we don’t even have to deal with database errors.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Did you know that Static websites are 10 times faster than a dynamic site built with a CMS?&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;What good is a website without a contact form? The traditional way of building a data collection functionality in this case — a contact form, would require you to bother with server-side code, web frameworks, etc., It requires you to write up your own form submission backend, which contradicts your motive to go static.&lt;/p&gt;

&lt;p&gt;Enter form backend solutions! There are many services out there like netlify forms, getform….but in this case, we are going to use &lt;a href="https://formX.stream"&gt;formX&lt;/a&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create a &lt;strong&gt;new workspace&lt;/strong&gt; for your domain and a &lt;strong&gt;new form&lt;/strong&gt;, from the formX dashboard.&lt;/li&gt;
&lt;li&gt;You will get a code snippet. Add that &lt;strong&gt;formX snippet&lt;/strong&gt; to your HTML code. It is a one-time process.
&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--zS_rxRSy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/4xvu772e3u60mk4aaand.png" alt="Alt Text"&gt;
&lt;/li&gt;
&lt;li&gt;Create your &lt;strong&gt;HTML form&lt;/strong&gt; (obviously!). &lt;strong&gt;“HTML element id”&lt;/strong&gt; is the only mandatory attribute in the form tag. Attributes like “method” and “post” are not needed.&lt;/li&gt;
&lt;li&gt;Replace &lt;strong&gt;“form_id”&lt;/strong&gt; with your own &lt;strong&gt;“HTML element id”&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;[&lt;em&gt;Fun fact: If you add this snippet to all the pages of your website, you can track insights like the list of pages the user visits before submitting the form, No of website visits, time spent on websites, UTM parameters, activity score, etc.,&lt;/em&gt;]&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Now sit back and see your submissions on the dashboard as they arrive. Stay updated with submissions through &lt;strong&gt;email, slack,&lt;/strong&gt; or any other channel of your choice. You also can set &lt;strong&gt;Auto redirect URL&lt;/strong&gt; and &lt;strong&gt;Autoresponder emails&lt;/strong&gt; to let your submitters know you are listening. They have &lt;strong&gt;Google reCaptcha&lt;/strong&gt; and &lt;strong&gt;Honeypot algorithms&lt;/strong&gt; to weed out spam entries.&lt;/p&gt;

&lt;h4&gt;
  
  
  Why formX?
&lt;/h4&gt;

&lt;p&gt;I’ve tried many form backend solutions before, but the reasons I prefer formX to others are;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;They don’t cap on the number of submissions you receive or the number of forms you can create.&lt;/li&gt;
&lt;li&gt;They have a nifty little CRM like feature that I use to process leads for my own convenience.
&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--0lL0T0v6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/gj0bjf66bd5ksn8vgsg2.png" alt="Alt Text"&gt;
&lt;/li&gt;
&lt;li&gt;We can add multiple users to the account so that I can keep my entire team on loop.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Conclusion
&lt;/h4&gt;

&lt;p&gt;Thus creating form backends is just as easy as &lt;strong&gt;copy and pasting&lt;/strong&gt;. It generally takes me &lt;strong&gt;less than 2 mins&lt;/strong&gt; to set up my forms. They are not limited to contact forms alone, you can create forms for feedback, newsletter signups, marketing signups, lead gen materials, mailing list subscribers, etc., Hope you get an idea on how to leverage form backend solutions while still using static sites and saving yourself time &amp;amp; money.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>serverless</category>
    </item>
  </channel>
</rss>
