php - ValidFormBuilder outputs strange javascript code -
i'm trying small proof of concept working validformbuilder. created form text area. simple, html validformbuilder generates not valid. there's javascript-code @ strange places, looks rubbish , there's lot of duplicate code in generated html. can tell me i'm doing wrong?
you can see strange behavior on here: http://zorginformatiegroep.nl/form/test.php
this code:
<?php require_once 'vendor/autoload.php'; use validformbuilder\validform; $objform = new validform("hello", "required fields printed in bold.", "/test.php"); $objform->addfield( "message", "your message", validform::vform_text, array( // make field required "required" => true ), array( // error message when required state isn't met "required" => "this required field" ), array( "cols" => 20, "rows" => 10 ) ); //*** generate form output if ($objform->isvalid() && $objform->issubmitted()) { $stroutput = $objform->valuesashtml(); } else { $stroutput = $objform->tohtml(); } echo $stroutput ?>
the 3.2 release of validform builder broken, found bug , created issue here:
https://github.com/neverwoods/validformbuilder/issues/14
i've bugged problem , our team has released new version: 3.2.1
if you've installed validform builder using composer, depending on configuration should fine running composer update
.
this should answer question.
Comments
Post a Comment