Projects

Here we will start my project areas of academic, professional and personal. Whenever you develop a solution that would find interesting, I'll post here to be tested (or even improved! icon smile Projetos ) For you.

These projects will be available for download and / or pages containing information.

tt twitter micro4 Projetos

Creation of dynamic forms with MFORMA

When I started working with web development, one of my first tasks were to create HTML forms for various purposes, such as contact pages, booking form etc..

I always thought a bag having to make all those forms one by one, besides having to validate them on the client-side via javascript.

In both these forms do, one day I promised myself I would create a script to do all this legwork to create the fields, style and validate, in a more dynamic and automatic.

And now that day has come, meet MFORMA! icon smile Criação dinâmica de formulários com MForm

mform Criação dinâmica de formulários com MForm

The MFORMA (M, Marcus! = P) is a script still in development but he can have a number of features that help a lot in day to day client-side developer.

You can see an example of MFORMA online by clicking here .

Features

  • Creating a stylized form with css
  • Creation of inputs of type text fields, radio and hidden
  • Creating textarea fields
  • Field validation with javascript with jQuery and the plugin FormValidator with my few changes, as well as translation to Portuguese (Brazil).

Limitations

Since this is version 1.0 of it MFORMA still some limitations. In this version does not have the option to create fields to select the type is dynamically generated from a more complex form. Another limitation is that only managed to generate a set of input fields of type radio.

But this first version already available, which will help while you can test it and even improve it.

How it works?

Well, the operation for the creation of the fields are given in an array. Each array is a field that wanted to add on the form.
Each array is created with five components:

  • name is the name attribute value of the field created
  • label is the name that will be inside a label tag
  • type is the type of the field. It can be text (text input type), radio (input type radio), textarea (textarea fields) and hidden (hidden input type)
  • validates is the field that indicates whether or not he will have validation. 1 for true and 0 for false
  • value is where is the value of the attribute value of the field. It is often used when we have to show the form with data already entered.



Finally, all the fields (which are arrays) are inserted in a main array (which I call fields) fields and the array is placed as the first parameter of the function geraMForm () that is responsible for bringing the dynamically generated form. The second parameter of the function where this is to be sent this form.
code Criação dinâmica de formulários com MForm

Download

The MFORMA can be downloaded here . This file is the MFORMA with a sample file.

You can also style the form according to his will. Forms.css Just select the file and modify it according to your preference.

So what do you think of MFORMA? The more feedback I get from you more MFORMA will become more robust and will help in the creation of all forms in a more agile and efficient.

tt twitter micro4 Criação dinâmica de formulários com MForm

Calculation of the CRE

Almost always want to know how our CRE (Coefficient of Educational Achievement), both to verify our income, and to see if he is able to get on that research project we want to participate. But every time the number of subjects increases, which makes the calculation of an exhausting manually. And that is why I decided to create a more automated way to calculate CRE.

Basically, the CRE is determined by the following expression:
cre Cálculo do CRE

Note: I took as a basis for calculating a document from the institution where they study, IFPB (formerly CEFET-PB), an interested person, click here .

Click here to calculate your CRE

tt twitter micro4 Cálculo do CRE

Copyright © 2012 Marcus Antonius All rights reserved.
Portfolio | Resume | Contact | Twitter | RSS