Upload & Install
Learn how to upload the Smart AI Contact Form to your server and embed it on your website.
Upload & Install
Installing the Smart AI Contact Form takes less than a minute. Because there is no database to configure and no Node.js/Composer dependencies to install, you simply upload the files to your server and paste a script tag into your HTML.
Step 1: Download & Extract
When you purchase the widget, you will receive a .zip file containing the source code.
- Download the
.zipfile to your computer. - Extract (unzip) the folder.
- You will see a folder containing files like
ai-handler.php,widget.js, and alibdirectory.
Step 2: Upload to Your Server
You can use any standard FTP client (like FileZilla) or your web host's built-in File Manager (like cPanel).
- Log in to your web hosting control panel or FTP client.
- Navigate to your website's public directory (usually
public_html,www, orhtdocs). - Create a new folder for the script. We recommend naming it something simple, like
ai-formorsupport-widget.- Example path:
public_html/ai-form/
- Example path:
- Upload all the extracted files and folders into this new directory.
Verify Your File Structure
Once uploaded, your folder on the server should look exactly like this:
π smart ai contact form/
βββ π lib/ (Contains PHPMailer files)
βββ π .env.example (Configuration template)
βββ π .htaccess (Security rules)
βββ π ai-handler.php (The main backend processor)
βββ π content.json (Your AI knowledge base)
βββ π embed.js (Inline form frontend)
βββ π form.html (UI for the floating widget)
βββ π script.js (Logic for the floating widget)
βββ π widget.js (The floating widget injector)Step 3: Embed on Your Website
Now that the files are hosted on your server, you can display the AI form anywhere on your website.
Replace https://yourwebsite.com/ with the actual URL where you uploaded the folder in Step 2.
Option A: Floating Widget (Recommended)
This creates a chat-style button in the bottom corner of your website.
Paste this just before your closing </body> tag:
<script src="https://yourwebsite.com/widget.js"></script>Option B: Inline Embed (Contact Page Style)
Use this method if you want the form to appear exactly where you place it on the page (e.g., a βContact Usβ page).
1. Add this container where the form should render:
<div id="ai-contact-form"></div>
<script src="https://yourwebsite.com/embed.js"></script>If you load your website right now, you will see the form! However, if you try to send a message, it will fail because we haven't added your API keys yet.
Let's fix that. Head over to the next section: API Keys (.env Setup).