Before you begin
- Sign in to the Liteshop dashboard.
- Install a tool that creates ZIP files. The examples use the
zipcommand, which macOS and most Linux distributions include.
Create the files
-
Create a folder named
my-site. -
In
my-site, createliteshop.json. This manifest declares the Site and its contact Form: -
Create
index.html. The page loads the Liteshop SDK from the Site’s own address,/_liteshop/sdk/v1.js, before your script: -
Create
main.js. It sends the form to Liteshop instead of letting the browser post it:Pass the Form ID as a literal string, as shown. Liteshop reads that call in your JavaScript to check that the declared Form has a handler.
Package and publish the Site
-
Create a ZIP file of the folder’s contents, so that
index.htmlandliteshop.jsonare at the root of the archive: - In the Liteshop dashboard, click Website > Upload files.
-
Enter a Site name and subdomain, select
site.zip, and click Check and publish.
Test the form
- Open the live Site, for example
https://my-site.liteshop.me. - Send a message with the form.
- In the Liteshop dashboard, click Messages. Your message appears there.