/**
  * FormHandler::resetButton()
  *
  * Create a resetButton on the form
  *
  * @param string $caption The caption of the button
  * @param string $name The name of the button
  * @param string $extra CSS, Javascript or other which are inserted into the HTML tag
  * @return \FormHandler\Button\Reset
  * @author Teye Heimans
  * @deprecated Use \FormHandler\Button\Reset::set() instead
  */
 public function resetButton($caption = null, $name = null, $extra = null)
 {
     return \FormHandler\Button\Reset::set($this, $caption, $name)->setExtra($extra);
 }
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
 * MA 02110-1301  USA
 *
 * @author Ruben de Vos
 */
include '../src/Loader.php';
use FormHandler\FormHandler;
use FormHandler\Field;
use FormHandler\Button;
use FormHandler\Validator;
\FormHandler\Configuration::set('fhtml_dir', '../src/FHTML/');
$form = new FormHandler();
Button\Button::set($form, 'Disable Button')->setDisabled();
Button\Button::set($form, 'Disable and enable Button')->setDisabled()->setDisabled(false);
Button\Cancel::set($form, 'Disable CancelButton')->setDisabled();
Button\Reset::set($form, 'Disable ResetButton')->setDisabled();
//process all form results, needs to be done before any output has been done
$form_html = $form->flush();
//below is code to show the form
echo 'Test for button confirmation<hr>';
echo $form_html;