Home » Source Code » RMT Form Generator

RMT Form Generator

Lee
2016-05-18 22:33:55
The author
View(s):
Download(s): 0
Point (s): 1 
Category Category:
AllAll

Description

A PHP form generator tool that support all kinds of implementations. Support Zend Forms and Plain HTML + PHP forms.

About RMT

RMT stands for Redmar, Martijn, Tom. Who are the lead developers for this project.

The project it self was an 'Patterns & Framework' assignment for school. We choose to create an generator tool to create web forms by a given yaml configuration file. We will proceed to develop the tool and try to make it stable and usable.

Our school is the University of Applied Sciences Utrecht in the Netherlands. http://international.hu.nl/

What does RMT Form Generator do?

It is a PHP tool to create universal web forms for any kind of framework by defining the form elements in a yaml file (http://www.yaml.org). It is not our goal to generate 100% code!! Our goal is to generate (from a maintainable configuration file) enough so you can choose how to implement it and make your own decisions.

How does it work?

  1. Define the form in the yaml file.
  2. Choose the parser (Zend Framework, plain html), that create the right form files.
  3. Generate the yaml with the RMT tool to generate the web forms.
  4. Defining you own way to implement the generated form files.

How does the generated files look like

We have chosen to use a abstract sub class.

Here is an example of a PLAIN (HTML + PHP) generated form:

Person.php ``` <?php

class Person extends BasePerson{

public function __construct(){
    $this->startForm();

    return $this->form;
}

public function startForm(){
    echo $this->getFirstname().'<br/>';
    echo $this->getLastname().'<br/>';
    echo $this->getPassword().'<br/>';
    echo $this->getGebdatum().'<br/>';

}

} ?> ```

generated/BasePerson.php ``` <?php

abstract class BasePerson { /** * Firstname */ public function getFirstname() { $Firstname = 'Firstname: ';

return $Firstname;

}

/** * Lastname */ public function getLastname() { $Lastname = 'Lastname: ';

return $Lastname;

}

/** * Password */ public function getPassword() { $Password = 'Password: ';

return $Password;

}

/** * Gebdatum */ public function getGebdatum() { $Gebdatum = 'Gebdatum: ';

return $Gebdatum;

}

} ?> ```

How does the yaml looks like?

Yaml is nested type of configuration.

  • person = root = form
  • options is a property of person
  • fields is a property of person
  • type is property of the firsname element
  • validators is a property of the firstname element
  • NotEmpty is a property of validators
  • error is a property of NotEmpty

Person: options: name: Person fields: Firstname: type: Text validators: NotEmpty: Alpha: error: 'Only alphabetic characters allowed.' Lastname: validators: NotEmpty: Alpha: Password: type: Password Gebdatum: label: 'Date of birth'

Class diagram

http://www.redmarstienstra.nl/wp-content/uploads/2010/06/rmt.jpg

Sponsored links

File list

Tips: You can preview the content of files by clicking file names^_^
Name Size Date
all-wcprops306.00 B15-06-10 19:48
entries787.00 B15-06-10 19:48
format2.00 B15-06-10 11:12
form.yml.svn-base364.00 B15-06-10 11:12
forms.yml.svn-base549.00 B15-06-10 15:25
index.php.svn-base360.00 B15-06-10 19:48
all-wcprops246.00 B15-06-10 11:12
entries606.00 B15-06-10 15:25
format2.00 B15-06-10 11:12
Klas.php.svn-base329.00 B15-06-10 11:12
Student.php.svn-base327.00 B15-06-10 11:12
all-wcprops292.00 B15-06-10 11:12
entries608.00 B15-06-10 15:25
format2.00 B15-06-10 11:12
BaseKlas.php.svn-base655.00 B15-06-10 11:12
BaseStudent.php.svn-base508.00 B15-06-10 11:12
BaseKlas.php655.00 B15-06-10 15:25
BasePerson.php643.00 B15-06-10 15:05
BaseStudent.php508.00 B15-06-10 15:25
Klas.php329.00 B15-06-10 15:25
Person.php341.00 B15-06-10 14:37
Student.php327.00 B15-06-10 15:25
forms.yml549.00 B15-06-10 11:15
index.php360.00 B15-06-10 19:46
all-wcprops510.00 B15-06-10 19:48
entries1.09 kB15-06-10 19:48
format2.00 B15-06-10 11:12
autoloader.php.svn-base870.00 B15-06-10 11:12
Builder.php.svn-base2.24 kB15-06-10 19:48
Form.php.svn-base4.74 kB15-06-10 11:12
Options.php.svn-base1.22 kB15-06-10 11:12
spyc.php.svn-base29.78 kB15-06-10 11:12
autoloader.php870.00 B15-06-10 11:12
all-wcprops354.00 B15-06-10 11:12
entries762.00 B15-06-10 15:25
format2.00 B15-06-10 11:12
Behaviour.php.svn-base274.00 B15-06-10 11:12
Element.php.svn-base2.90 kB15-06-10 11:12
Form.php.svn-base3.73 kB15-06-10 11:12
Behaviour.php274.00 B15-06-10 11:12
Element.php2.90 kB15-06-10 11:12
Form.php3.73 kB15-06-10 11:12
Builder.php2.24 kB15-06-10 19:45
all-wcprops76.00 B15-06-10 11:12
entries271.00 B15-06-10 15:25
format2.00 B15-06-10 11:12
Form.php4.74 kB15-06-10 11:12
Options.php1.22 kB15-06-10 11:12
spyc.php29.78 kB15-06-10 11:12
all-wcprops69.00 B15-06-10 15:25
entries301.00 B15-06-10 15:25
format2.00 B15-06-10 11:12
all-wcprops172.00 B15-06-10 11:12
entries448.00 B15-06-10 15:25
format2.00 B15-06-10 11:12
Form.php.svn-base254.00 B15-06-10 11:12
all-wcprops299.00 B15-06-10 11:12
entries608.00 B15-06-10 15:25
format2.00 B15-06-10 11:12
Password.php.svn-base619.00 B15-06-10 11:12
Text.php.svn-base611.00 B15-06-10 11:12
Password.php619.00 B15-06-10 11:12
Text.php611.00 B15-06-10 11:12
Form.php254.00 B15-06-10 11:12
all-wcprops168.00 B15-06-10 15:25
entries479.00 B15-06-10 15:25
format2.00 B15-06-10 11:12
Form.php.svn-base2.26 kB15-06-10 15:25
all-wcprops85.00 B15-06-10 11:12
entries280.00 B15-06-10 15:25
format2.00 B15-06-10 11:12
all-wcprops1.23 kB15-06-10 11:12
entries2.04 kB15-06-10 15:25
format2.00 B15-06-10 11:12
Button.php.svn-base316.00 B15-06-10 11:12
Captcha.php.svn-base316.00 B15-06-10 11:12
File.php.svn-base313.00 B15-06-10 11:12
MultiCheckbox.php.svn-base323.00 B15-06-10 11:12
MultiSelect.php.svn-base320.00 B15-06-10 11:12
Password.php.svn-base318.00 B15-06-10 11:12
Radio.php.svn-base315.00 B15-06-10 11:12
Select.php.svn-base316.00 B15-06-10 11:12
Submit.php.svn-base315.00 B15-06-10 11:12
Text.php.svn-base313.00 B15-06-10 11:12
Textarea.php.svn-base318.00 B15-06-10 11:12
Button.php316.00 B15-06-10 11:12
Captcha.php316.00 B15-06-10 11:12
File.php313.00 B15-06-10 11:12
MultiCheckbox.php323.00 B15-06-10 11:12
MultiSelect.php320.00 B15-06-10 11:12
Password.php318.00 B15-06-10 11:12
Radio.php315.00 B15-06-10 11:12
Select.php316.00 B15-06-10 11:12
Submit.php315.00 B15-06-10 11:12
Text.php313.00 B15-06-10 11:12
Textarea.php318.00 B15-06-10 11:12
Form.php2.26 kB15-06-10 11:21
all-wcprops301.00 B15-06-10 11:12
entries609.00 B15-06-10 15:25
format2.00 B15-06-10 11:12
Alpha.php.svn-base114.00 B15-06-10 11:12
NotEmpty.php.svn-base117.00 B15-06-10 11:12
Alpha.php114.00 B15-06-10 11:12
NotEmpty.php117.00 B15-06-10 11:12
all-wcprops166.00 B15-06-10 11:12
entries478.00 B15-06-10 15:25
format2.00 B15-06-10 11:12
Form.php.svn-base1.86 kB15-06-10 11:12
all-wcprops84.00 B15-06-10 11:12
entries279.00 B15-06-10 15:25
format2.00 B15-06-10 11:12
all-wcprops1.22 kB15-06-10 11:12
entries2.04 kB15-06-10 15:25
format2.00 B15-06-10 11:12
Button.php.svn-base285.00 B15-06-10 11:12
Captcha.php.svn-base287.00 B15-06-10 11:12
File.php.svn-base281.00 B15-06-10 11:12
MultiCheckbox.php.svn-base299.00 B15-06-10 11:12
MultiSelect.php.svn-base295.00 B15-06-10 11:12
Password.php.svn-base289.00 B15-06-10 11:12
Radio.php.svn-base283.00 B15-06-10 11:12
Select.php.svn-base285.00 B15-06-10 11:12
Submit.php.svn-base285.00 B15-06-10 11:12
Text.php.svn-base281.00 B15-06-10 11:12
Textarea.php.svn-base289.00 B15-06-10 11:12
Button.php285.00 B15-06-10 11:12
Captcha.php287.00 B15-06-10 11:12
File.php281.00 B15-06-10 11:12
MultiCheckbox.php299.00 B15-06-10 11:12
MultiSelect.php295.00 B15-06-10 11:12
Password.php289.00 B15-06-10 11:12
Radio.php283.00 B15-06-10 11:12
Select.php285.00 B15-06-10 11:12
Submit.php285.00 B15-06-10 11:12
Text.php281.00 B15-06-10 11:12
Textarea.php289.00 B15-06-10 11:12
Form.php1.86 kB15-06-10 11:12
all-wcprops298.00 B15-06-10 11:12
entries608.00 B15-06-10 15:25
format2.00 B15-06-10 11:12
Alpha.php.svn-base154.00 B15-06-10 11:12
NotEmpty.php.svn-base197.00 B15-06-10 11:12
Alpha.php154.00 B15-06-10 11:12
NotEmpty.php197.00 B15-06-10 11:12
<prop-base>0.00 B15-06-10 11:12
<props>0.00 B15-06-10 11:12
<text-base>0.00 B15-06-10 11:12
<prop-base>0.00 B15-06-10 11:12
<props>0.00 B15-06-10 11:12
<text-base>0.00 B15-06-10 11:12
<prop-base>0.00 B15-06-10 11:12
<props>0.00 B15-06-10 11:12
<text-base>0.00 B15-06-10 11:12
<prop-base>0.00 B15-06-10 11:12
<props>0.00 B15-06-10 11:12
<text-base>0.00 B15-06-10 11:12
<prop-base>0.00 B15-06-10 11:12
<props>0.00 B15-06-10 11:12
<text-base>0.00 B15-06-10 11:12
<prop-base>0.00 B15-06-10 11:12
<props>0.00 B15-06-10 11:12
<text-base>0.00 B15-06-10 11:12
<prop-base>0.00 B15-06-10 11:12
<props>0.00 B15-06-10 11:12
<text-base>0.00 B15-06-10 11:12
<prop-base>0.00 B15-06-10 11:12
<props>0.00 B15-06-10 11:12
<text-base>0.00 B15-06-10 11:12
<prop-base>0.00 B15-06-10 11:12
<props>0.00 B15-06-10 11:12
<text-base>0.00 B15-06-10 11:12
<prop-base>0.00 B15-06-10 11:12
<props>0.00 B15-06-10 11:12
<text-base>0.00 B15-06-10 11:12
<prop-base>0.00 B15-06-10 11:12
<props>0.00 B15-06-10 11:12
<text-base>0.00 B15-06-10 11:12
<prop-base>0.00 B15-06-10 11:12
<props>0.00 B15-06-10 11:12
<text-base>0.00 B15-06-10 11:12
<tmp>0.00 B15-06-10 15:25
<prop-base>0.00 B15-06-10 11:12
<props>0.00 B15-06-10 11:12
<text-base>0.00 B15-06-10 15:25
<prop-base>0.00 B15-06-10 11:12
<props>0.00 B15-06-10 11:12
<text-base>0.00 B15-06-10 11:12
<tmp>0.00 B15-06-10 15:25
<prop-base>0.00 B15-06-10 11:12
<props>0.00 B15-06-10 11:12
<text-base>0.00 B15-06-10 11:12
<tmp>0.00 B15-06-10 15:25
<prop-base>0.00 B15-06-10 11:12
<props>0.00 B15-06-10 11:12
<text-base>0.00 B15-06-10 11:12
<tmp>0.00 B15-06-10 15:25
<prop-base>0.00 B15-06-10 11:12
<props>0.00 B15-06-10 11:12
<text-base>0.00 B15-06-10 11:12
<prop-base>0.00 B15-06-10 11:12
<props>0.00 B15-06-10 11:12
<text-base>0.00 B15-06-10 11:12
<tmp>0.00 B15-06-10 15:25
<prop-base>0.00 B15-06-10 11:12
<props>0.00 B15-06-10 11:12
<text-base>0.00 B15-06-10 11:12
<tmp>0.00 B15-06-10 15:25
<prop-base>0.00 B15-06-10 11:12
<props>0.00 B15-06-10 11:12
<text-base>0.00 B15-06-10 11:12
<tmp>0.00 B15-06-10 15:25
<prop-base>0.00 B15-06-10 11:12
<props>0.00 B15-06-10 11:12
<text-base>0.00 B15-06-10 11:12
<prop-base>0.00 B15-06-10 11:12
<props>0.00 B15-06-10 11:12
<text-base>0.00 B15-06-10 11:12
<tmp>0.00 B15-06-10 15:25
<prop-base>0.00 B15-06-10 11:12
<props>0.00 B15-06-10 11:12
<text-base>0.00 B15-06-10 19:48
<prop-base>0.00 B15-06-10 11:12
<props>0.00 B15-06-10 11:12
<text-base>0.00 B15-06-10 11:12
<tmp>0.00 B15-06-10 15:25
<prop-base>0.00 B15-06-10 11:12
<props>0.00 B15-06-10 11:12
<text-base>0.00 B15-06-10 11:12
<tmp>0.00 B15-06-10 15:25
<prop-base>0.00 B15-06-10 11:12
<props>0.00 B15-06-10 11:12
<text-base>0.00 B15-06-10 11:12
<prop-base>0.00 B15-06-10 11:12
<props>0.00 B15-06-10 11:12
<text-base>0.00 B15-06-10 11:12
<tmp>0.00 B15-06-10 15:25
<.svn>0.00 B15-06-10 15:25
<prop-base>0.00 B15-06-10 11:12
<props>0.00 B15-06-10 11:12
<text-base>0.00 B15-06-10 15:25
<tmp>0.00 B15-06-10 15:25
<.svn>0.00 B15-06-10 15:25
<.svn>0.00 B15-06-10 15:25
<.svn>0.00 B15-06-10 15:25
<prop-base>0.00 B15-06-10 11:12
<props>0.00 B15-06-10 11:12
<text-base>0.00 B15-06-10 11:12
<tmp>0.00 B15-06-10 15:25
<.svn>0.00 B15-06-10 15:25
<.svn>0.00 B15-06-10 15:25
<.svn>0.00 B15-06-10 15:25
<prop-base>0.00 B15-06-10 11:12
<props>0.00 B15-06-10 11:12
<text-base>0.00 B15-06-10 19:48
<prop-base>0.00 B15-06-10 11:12
<props>0.00 B15-06-10 11:12
<text-base>0.00 B15-06-10 11:12
<tmp>0.00 B15-06-10 15:25
<.svn>0.00 B15-06-10 15:25
<prop-base>0.00 B15-06-10 11:12
<props>0.00 B15-06-10 11:12
<text-base>0.00 B15-06-10 19:48
<tmp>0.00 B15-06-10 19:48
<.svn>0.00 B15-06-10 19:48
<.svn>0.00 B15-06-10 19:48
<prop-base>0.00 B15-06-10 11:12
<props>0.00 B15-06-10 11:12
<text-base>0.00 B15-06-10 11:12
<tmp>0.00 B15-06-10 15:25
<.svn>0.00 B15-06-10 15:25
<Element>0.00 B15-06-10 11:12
<.svn>0.00 B15-06-10 15:25
<Decorator>0.00 B15-06-10 11:12
<Element>0.00 B15-06-10 11:12
<Validator>0.00 B15-06-10 11:12
<.svn>0.00 B15-06-10 15:25
<Decorator>0.00 B15-06-10 11:12
<Element>0.00 B15-06-10 11:12
<Validator>0.00 B15-06-10 11:12
<prop-base>0.00 B15-06-10 11:12
<props>0.00 B15-06-10 11:12
<text-base>0.00 B15-06-10 19:48
<tmp>0.00 B15-06-10 19:48
<.svn>0.00 B15-06-10 15:25
<generated>0.00 B15-06-10 15:25
<.svn>0.00 B15-06-10 19:48
<Base>0.00 B15-06-10 11:12
<Exception>0.00 B15-06-10 11:12
<.svn>0.00 B15-06-10 15:25
<CakePHP>0.00 B15-06-10 11:12
<Plain>0.00 B15-06-10 11:12
<Zend>0.00 B15-06-10 11:12
<.svn>0.00 B15-06-10 19:48
<forms>0.00 B15-06-10 15:25
<lib>0.00 B15-06-10 11:12
<Parser>0.00 B15-06-10 11:12
<RTM>0.00 B15-06-10 15:26
readme.txt141.00 B15-06-10 19:50
...
Sponsored links

Comments

(Add your comment, get 0.1 Point)
Minimum:15 words, Maximum:160 words
  • 1
  • Page 1
  • Total 1

RMT Form Generator (70.71 kB)

Need 1 Point(s)
Your Point (s)

Your Point isn't enough.

Get 22 Point immediately by PayPal

Point will be added to your account automatically after the transaction.

More(Debit card / Credit card / PayPal Credit / Online Banking)

Submit your source codes. Get more Points

LOGIN

Don't have an account? Register now
Need any help?
Mail to: support@codeforge.com

切换到中文版?

CodeForge Chinese Version
CodeForge English Version

Where are you going?

^_^"Oops ...

Sorry!This guy is mysterious, its blog hasn't been opened, try another, please!
OK

Warm tip!

CodeForge to FavoriteFavorite by Ctrl+D