SnipForm Wrap
Testing
SnipForm comes with a built-in testing suite. This will show you in real time how your form's data is being parsed and provide you with tools to test error , valid and loading/submit states. You can also test your results content.
Setting 'test' mode
Set the mode='test'
attribute on the <snip-form>
element to enable test mode.
<snip-form mode="test">
Test mode will not submit your form
Be sure not to leave your form in test mode on your live site. It's best to test your form locally before deploying it to production.
Data debug
In the test suite, you can see the data in real time as it is being parsed. This is useful for debugging your form's data and seeing how it will be sent.
Testing error states
There's a toggle to test error states. This will show you how your form will look when there are errors.
Testing submit states
This toggle will test the submit state. This will show you how your form will look when it is submitting.
Testing loading state
This toggle will simulate the loading state. This will show you what will be displayed while the form is loading or being submitted.
Testing result content
This toggle will test your result content. This will show you what will be displayed once the form has been successfully submitted.