Setting up your form with Kwes first requires setting up your dashboard and second creating your form. Our setup requirements allow you to use our top-notch form security, our timesaving building components, and complete spam protection.
The first two steps are to name your project website and form in your Kwes account.
On the dashboard page click on the "add a website" button and give your website a name.
On the next panel give your form a name.
From this point forward you start building your form in your code editor using HTML, CSS, our form building components and whatever else your form may require.
Place your form inside any type of HTML element that has a class of
kwes-form. Kwes needs this to find your form.
Add the form endpoint URL we provide to your form action.
Add your form fields the same way you normally would with HTML and CSS. All fields require a unique "name" attribute.
You can add our powerful form validation rules to your form fields inside a rules attribute. Even though it's not required for your form to work, it's highly recommended for a better user experience and spam protection.
Go to your form and send your first submission to connect your form to Kwes.
Every website is allowed one live domain and one testing domain for their forms. Once your first submission is completed, you will be presented with the option to assign your domain as a live or testing domain.
The setup of a Kwes form may need to be adjusted depending on your chosen framework.
Step 3 of the setup process does not work with SPA's. If you add our JS script before the closing
</body> tag, it will not reload the script whenever you navigate away from the page and back to it.
To integrate Kwes with your SPA you need to include the script in the mounted function of the view that you would like to use Kwes in. This way, the script loads whenever the view loads.
Steps 3 - 7 of the setup process should be adjusted to one of these 3 options:
You can setup a Kwes form inside the WordPress page/post editor for very basic forms. With this option you run the risk of the form not working correctly since WordPress may strip the form of important components needed for it to work properly.
You can place your Kwes form code inside a template file.
You can turn your Kwes form code into a WordPress shortcode and add it to in the Wordpress page/post editor.