Submitting Forms when PHP Spell Check is Complete
PHP Spell Check > Documentation > Tutorials > Spell Check and Submit Forms
The PHP SpellCheckButton Class allows you to validate the spelling in forms - and submit the form on completion.
The spelling validation can contain any number of textareas, text fields, HTML Elements, Rich HTML Editors or Iframes can be spellchecked simultaneously.
- The SpellCheckButton property FormToSubmit should be set to the Id of the form in question.
- You no longer need a normal submit button in your form.
- The ShowSummaryScreen property is normally set to false for a smoother user experience.
<form action="success.php" id="form1" method="post">
<textarea id="formfield1" name="formfield1" >Content</textarea>
<textarea id="formfield2" name="formfield2" >Content</textarea>
</form>
<?php
require "/phpspellcheck/include.php";
$mySpell = new SpellCheckButton();
$mySpell->InstallationPath = "/phpspellcheck/";
$mySpell->Fields = "formfield1,formfield2";
$mySpell->ShowSummaryScreen = false;
$mySpell->FormToSubmit = "form1";
echo $mySpell->SpellButton("Spell Check And Submit");
?>