How to Collect Data From Forms

Collecting data from your website visitors is crucial for engagement, feedback, and leads. Static.app simplifies this process, eliminating the need for complex server-side code or third-party form builders. You can easily capture any data from your existing HTML forms by adding a single attribute.

Setting Up the Form for Data Collection

Option 1: Uploading a Website with an Existing Form

If your website already contains an HTML form, you can upload the entire site to Static.app:

  1. Navigate to the Site's page and add a new site.
  2. In your Static.app dashboard, go to Sites and click on your newly uploaded website.
  3. Navigate to the Pages section (or Files) and locate the HTML file containing your form (e.g., index.html , contact.html ).
  4. Click the three-dot menu next to the file and choose Edit Code.
Edit Code in Forms
Edit Code in Forms

Option 2: Creating a New Page/File for Your Form

If you want to add a new form to an existing Static.app site or create a new page specifically for your form:

  1. Log in to your Static.app account and select the website you want to add the form to from your Sites list.
  2. Add a new page or upload a new file.
  3. If you just created a blank page/file, click the three-dot menu next to it and select Edit Code.
  4. Add your HTML form structure within this file.
  5. Click Save Changes.

Enable Form Data Collection

Now, you'll modify the HTML code to activate Static.app's form collection feature.

  1. Navigate to the Pages or Files section of your website.
  2. Find the HTML file containing your form.
  3. Click the three-dot menu next to it and select Edit Code.
  4. In the code editor, find your opening <form> tag.
  5. Add the static-form attribute to your <form> tag.
<form static-form>...</form>
  1. To group submissions into a specific category (e.g., "job-applications," "newsletter-signups"), add the static-form-id attribute.
<form static-form static-form-id="contacts">...</form>
Add Static Form Attribute
Add Static Form Attribute

You can then now view and manage your submissions directly from your dashboard.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us