I agree with “Black202”. As far as I can tell, the code generated cannot be used as is. For example, this is the code I generated:
<?php
// Don't forget to include the EasyForms library
include("lib/init.php");
$Form = new Base_Form("leopold","gvform","");
$Form->SetPhpCallback("formHandle");
$Element1 = new Base_Text("Vorname", "Vorname", "", true, null, "");
$Form->Add($Element1);
$Element2 = new Base_Text("Name", "Name", "", true, null, "");
$Form->Add($Element2);
$Element3 = new Base_Text("Straße", "Strasse", "", false, null, "");
$Form->Add($Element3);
$Element4 = new Base_Text("Stadt", "Stadt", "", false, null, "");
$Form->Add($Element4);
$Element5 = new Base_Text("PLZ", "PLZ", "", false, null, "");
$Form->Add($Element5);
$Element16 = new Base_Text("Telefon", "Telefon", "", false, null, "");
$Form->Add($Element16);
$Element18 = new Base_Text("E-Mail", "Email", "", true, null, "");
$Form->Add($Element18);
$Element20 = new Base_Checkbox("Suche", "Suche", "JA", false, false, "");
$Form->Add($Element20);
$Element22 = new Base_Checkbox("Biete", "Biete", "JA", false, false, "");
$Form->Add($Element22);
$Element24 = new Base_Text("Hersteller", "Hersteller", "", false, null, "");
$Form->Add($Element24);
$Element26 = new Base_Text("Model", "Model", "", false, null, "");
$Form->Add($Element26);
$Element28 = new Base_Text("Referenz", "Referenz", "", false, null, "");
$Form->Add($Element28);
$Element30 = new Base_Text("Preisvorstellung", "Preisvorstellung", "", false, null, "");
$Form->Add($Element30);
$Element32 = new Base_Textarea("Nachricht", "Nachricht", "", 35, 10, false, null, "");
$Form->Add($Element32);
$Form->Add(new Base_Submit("btncontact", "Send"));
function formHandle($data){
echo "Vorname = " . $data['Vorname'] . "<br />";
echo "Name = " . $data['Name'] . "<br />";
echo "Strasse = " . $data['Strasse'] . "<br />";
echo "Stadt = " . $data['Stadt'] . "<br />";
echo "PLZ = " . $data['PLZ'] . "<br />";
echo "Telefon = " . $data['Telefon'] . "<br />";
echo "Email = " . $data['Email'] . "<br />";
echo "Suche = " . $data['Suche'] . "<br />";
echo "Biete = " . $data['Biete'] . "<br />";
echo "Hersteller = " . $data['Hersteller'] . "<br />";
echo "Model = " . $data['Model'] . "<br />";
echo "Referenz = " . $data['Referenz'] . "<br />";
echo "Preisvorstellung = " . $data['Preisvorstellung'] . "<br />";
echo "Nachricht = " . $data['Nachricht'] . "<br />";
}
?>
if(!$Form->Processed()){
echo $Form->__toString();
}
As you can see, under “function formhandle” everything is echoed. There is nothing in the documentation that tells me I have to remove the echo tags, or for that matter, what I need to do in order to get this working. Nor is there nothing in the documentation that tells me how or where I need to add an Email address, or for that matter, how to get the code I generated into a funtioning script.
Lastly, the generated code is completely different from the code provided in the examples.
Generated Code:
$Element1 = new Base_Text("Vorname", "Vorname", "", true, null, "");
$Form->Add($Element1);
$Element2 = new Base_Text("Name", "Name", "", true, null, "");
$Form->Add($Element2)
Code in Example 4:
$Form->Add(new Base_Text("Name", "txtname", "", true, new Base_Validators_NotEmpty("Fill in your name.")));
$Form->Add(new Base_Text("Email", "txtemail", "", true, new Base_Validators_Email("Fill in a valid email address.")));
I’m disappointed. The name “Form Generator” is definitely misleading: “With Form Generator we make an end to this. EasyForms is a PHP library that helps you create forms on a fast and easy way including input validation.”
Sorry, dude, you missed the mark on this one!


613 Purchases
127 Comments