-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathindex.php
38 lines (36 loc) · 1.55 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<html>
<head>
<title>Form.php Örnek Kullanım</title>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<link href="css/style.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/validation.js"></script>
</head>
<body>
<div align='center'>
<?php
include_once 'FormCreator/Form.php';
//FormHelper ile amele işlerin yaptırılacağı bir class yazılabilir.
try {
$form = new Form("test.php");
$form->setFormAttributes(array('id' => 'formId'));
$form->setTableAttributes(array("class"=>"table"));
$form->addInput("text", "name", "Email")->setValidation(array("required"=>true,"min"=>3));
$form->addInput("password", "pass", "Şifre")->setValidation(array("required"=>true,"min"=>8));
$form->addInput("text", "yas","Yaş");
$form->addLabel("Cinsiyet:");
$form->addRadioButton("cinsiyet", "erkek", "Erkek",array("checked"=>"checked"));
$form->addRadioButton("cinsiyet", "bayan", "Bayan");
$form->addComboBox("carbrand","Arabanızın Markası", array('mercedes' => 'Mercedes', 'bmw' => 'BMW'));
//$form->addTextArea(32, 5, "adres","Adres");
//$form->addCheckBox("termofuse", "read", "Kullanmıcı Sözleşmesini okudum")->setValidation(array("mustBeChecked"=>true));
$form->addTermsOfUse("files/file.txt",true);
$form->addInput("submit", "dugme", "Kaydet");
echo $form->show();
} catch (Exception $ex) {
echo $ex->getMessage();
}
?>
</div>
</body>
</html>