SlideShare una empresa de Scribd logo
1 de 48
Descargar para leer sin conexión
jFormino
Kang-min Liu gugod@gugod.org
jFormino
jQuery Form by Handlino
What does it do
Dynamic
  Form
Generator
Generate
<form>
Simple Example

$(quot;<div/>quot;)
.attr({ id: quot;form1quot; })
.prependTo(document.body)
.formino({
    legend: quot;Test Purpose Formquot;,
    params: [ quot;field_onequot; ]
});
Extended Example
$(quot;<div/>quot;).attr({ id: quot;form1quot; }).prependTo(document.body)
.formino({
    legend: quot;Test Purpose Formquot;,
    params: [
        // only give field name, with auto-generateed label.
        quot;field_onequot;,
        // manually assign a label
        {
            label: quot;Fooquot;,
            name: quot;foo_fieldquot;
        },
        // with initial value
        {
            label: quot;Barquot;,
            name: quot;bar_fieldquot;,
            value: quot;42quot;
        },
        // other types
        {
            name: quot;xyzquot;,
            label: quot;XYZquot;,
            type: quot;checkboxquot;,
            values: [ 42, 43, 44 ]
        }
    ]
});
Google Map
$(quot;#form1quot;).formino({
     legend: 'GoogleMap demo',
     params: [
         {
             label: 'Standard Google Map ',
             name: 'm',
             type: 'googlemap',
             value_for_latitude: '25.08532',
             value_for_longitude: '121.561499',
             zlevel: 13
         },
     ],
     buttons: [
         {
             quot;typequot;: quot;submitquot;,
             quot;labelquot;: quot;Goquot;,
             quot;valuequot;: quot;goquot;
         },
         {
             quot;typequot;: quot;resetquot;,
             quot;labelquot;: quot;Resetquot;
         }
   ]
})
Google Map
$(quot;#form1quot;).formino({
     legend: 'GoogleMap demo',
     params: [
         {
             label: 'Standard Google Map ',
             name: 'm',
             type: 'googlemap',
             value_for_latitude: '25.08532',
             value_for_longitude: '121.561499',
             zlevel: 13
         },
     ],
     buttons: [
         {
             quot;typequot;: quot;submitquot;,
             quot;labelquot;: quot;Goquot;,
             quot;valuequot;: quot;goquot;
         },
         {
             quot;typequot;: quot;resetquot;,
             quot;labelquot;: quot;Resetquot;
         }
   ]
})
Google Map
$(quot;#form1quot;).formino({
     legend: 'GoogleMap demo',
     params: [
         {
             label: 'Standard Google Map ',
             name: 'm',
             type: 'googlemap',
             value_for_latitude: '25.08532',
             value_for_longitude: '121.561499',
             zlevel: 13
         },
     ],
     buttons: [
         {
             quot;typequot;: quot;submitquot;,
             quot;labelquot;: quot;Goquot;,
             quot;valuequot;: quot;goquot;
         },
         {
             quot;typequot;: quot;resetquot;,
             quot;labelquot;: quot;Resetquot;
         }
   ]
})
Form Element
  UI Binder
$(quot;input#fooquot;).formino({
    act_as: 'datetime-calendar',

      buttons: [
          { type: quot;submitquot;, label: quot;OKquot; },
          { type: quot;cancelquot;, label: quot;Nevermindquot; },
          {
              label: quot;Helloquot;,
              click: function(selected_date) {
                  $(quot;#messagequot;)
                  .text( quot;Hello, you select quot; + selected_date.toString() );
              }
          }
      ]
});
$(quot;input#fooquot;).formino({
    act_as: 'datetime-calendar',

      buttons: [
          { type: quot;submitquot;, label: quot;OKquot; },
          { type: quot;cancelquot;, label: quot;Nevermindquot; },
          {
              label: quot;Helloquot;,
              click: function(selected_date) {
                  $(quot;#messagequot;)
                  .text( quot;Hello, you select quot; + selected_date.toString() );
              }
          }
      ]
});
$(quot;input#fooquot;).formino({
    act_as: 'datetime-calendar',

      buttons: [
          { type: quot;submitquot;, label: quot;OKquot; },
          { type: quot;cancelquot;, label: quot;Nevermindquot; },
          {
              label: quot;Helloquot;,
              click: function(selected_date) {
                  $(quot;#messagequot;)
                  .text( quot;Hello, you select quot; + selected_date.toString() );
              }
          }
      ]
});
$(quot;input#fooquot;).formino({
    act_as: 'datetime-calendar',

      buttons: [
          { type: quot;submitquot;, label: quot;OKquot; },
          { type: quot;cancelquot;, label: quot;Nevermindquot; },
          {
              label: quot;Helloquot;,
              click: function(selected_date) {
                  $(quot;#messagequot;)
                  .text( quot;Hello, you select quot; + selected_date.toString() );
              }
          }
      ]
});




                                 YUI Skin compatible CSS
Why we designed it
Requirement
From Work
Dynamic
 Form
jQuery(quot;div#for-formquot;)
.html(quot;<form><input/>...</formquot;);
Not Elegant
What’s the Problem ?
jQuery(quot;div#for-formquot;)
.html(quot;<form><input/>...</formquot;);
Less Readable
Extend
Parameters
Declarative
 Syntax
Easy to Read ☺
Very Extendable ☺
All Parameters ☺
Input Type
• Primitives
 • text, password, select, radio, checkbox
• Extended
 • Date, Time, Date+Time
 • Google Map
 • Date Range, Ranged Value
How to use it
$(quot;#form1quot;).formino({
    legend: quot;jquery.form simple demoquot;,
    params: {
        quot;Titlequot;: quot;(The Title)quot;,
        quot;namequot;: {
            label: quot;Namequot;
        },
        quot;readyquot;: {
            label: quot;Ready ?quot;,
            type: quot;radioquot;,
            values: [ quot;yesquot;, quot;noquot; ]
        },
        quot;xoryorzquot;: {
            label: quot;X, Y, or Z?quot;,
            type: quot;radioquot;,
            values: [ quot;Xquot;, quot;Yquot;, quot;Zquot; ]
        },
        quot;ctoquot;: {
            label: quot;Check These Outquot;,
            type: quot;checkboxquot;,
            values: [ quot;Checkquot;, quot;Thesequot;, quot;Outquot; ]
        },
        quot;favorite_foodquot;: {
            label: quot;Favorite Foodquot;,
            type: quot;selectquot;,
            values: [quot;Hamquot;, quot;Hammerquot;, quot;Hamburgerquot;]
        }
    },

   buttons: [
       {
           quot;typequot;: quot;submitquot;,
           quot;labelquot;: quot;Goquot;,
           quot;valuequot;: quot;goquot;
       },
       {
           quot;typequot;: quot;resetquot;,
           quot;labelquot;: quot;Resetquot;
       }
  ]
})
.submit(function() {
    $(quot;#messagequot;).html(quot;You just submit that form:<pre>quot; + $(this).serialize() + quot;</pre>quot;);
    setTimeout(function() { $(quot;#messagequot;).empty(); }, 60000);
    return false;
});
$(quot;#form1quot;).formino({
    legend: quot;jquery.form simple demoquot;,
    params: {
        quot;Titlequot;: quot;(The Title)quot;,
        quot;namequot;: {
            label: quot;Namequot;
        },
        quot;readyquot;: {
            label: quot;Ready ?quot;,
            type: quot;radioquot;,
            values: [ quot;yesquot;, quot;noquot; ]
        },
        quot;xoryorzquot;: {
            label: quot;X, Y, or Z?quot;,
            type: quot;radioquot;,
            values: [ quot;Xquot;, quot;Yquot;, quot;Zquot; ]
        },
        quot;ctoquot;: {
            label: quot;Check These Outquot;,
            type: quot;checkboxquot;,
            values: [ quot;Checkquot;, quot;Thesequot;, quot;Outquot; ]
        },
        quot;favorite_foodquot;: {
            label: quot;Favorite Foodquot;,
            type: quot;selectquot;,
            values: [quot;Hamquot;, quot;Hammerquot;, quot;Hamburgerquot;]
        }
    },

   buttons: [
       {
           quot;typequot;: quot;submitquot;,
           quot;labelquot;: quot;Goquot;,
           quot;valuequot;: quot;goquot;
       },
       {
           quot;typequot;: quot;resetquot;,
           quot;labelquot;: quot;Resetquot;
       }
  ]
})
.submit(function() {
    $(quot;#messagequot;).html(quot;You just submit that form:<pre>quot; + $(this).serialize() + quot;</pre>quot;);
    setTimeout(function() { $(quot;#messagequot;).empty(); }, 60000);
    return false;
});
$(quot;#form1quot;).formino({
    legend: quot;jquery.form simple demoquot;,
    params: {
        quot;Titlequot;: quot;(The Title)quot;,
        quot;namequot;: {
            label: quot;Namequot;
        },
        quot;readyquot;: {
            label: quot;Ready ?quot;,
            type: quot;radioquot;,
            values: [ quot;yesquot;, quot;noquot; ]
        },
        quot;xoryorzquot;: {
            label: quot;X, Y, or Z?quot;,
            type: quot;radioquot;,
            values: [ quot;Xquot;, quot;Yquot;, quot;Zquot; ]
        },
        quot;ctoquot;: {
            label: quot;Check These Outquot;,
            type: quot;checkboxquot;,
            values: [ quot;Checkquot;, quot;Thesequot;, quot;Outquot; ]
        },
        quot;favorite_foodquot;: {
            label: quot;Favorite Foodquot;,
            type: quot;selectquot;,
            values: [quot;Hamquot;, quot;Hammerquot;, quot;Hamburgerquot;]
        }
    },

   buttons: [
       {
           quot;typequot;: quot;submitquot;,
           quot;labelquot;: quot;Goquot;,
           quot;valuequot;: quot;goquot;
       },
       {
           quot;typequot;: quot;resetquot;,
           quot;labelquot;: quot;Resetquot;
       }
  ]
})
.submit(function() {
    $(quot;#messagequot;).html(quot;You just submit that form:<pre>quot; + $(this).serialize() + quot;</pre>quot;);
    setTimeout(function() { $(quot;#messagequot;).empty(); }, 60000);
    return false;
});
$(quot;#form1quot;).formino({
    legend: quot;jquery.form simple demoquot;,
    params: {
        quot;Titlequot;: quot;(The Title)quot;,
        quot;namequot;: {
            label: quot;Namequot;
        },
        quot;readyquot;: {
            label: quot;Ready ?quot;,
            type: quot;radioquot;,
            values: [ quot;yesquot;, quot;noquot; ]
        },
        quot;xoryorzquot;: {
            label: quot;X, Y, or Z?quot;,
            type: quot;radioquot;,
            values: [ quot;Xquot;, quot;Yquot;, quot;Zquot; ]
        },
        quot;ctoquot;: {
            label: quot;Check These Outquot;,
            type: quot;checkboxquot;,
            values: [ quot;Checkquot;, quot;Thesequot;, quot;Outquot; ]
        },
        quot;favorite_foodquot;: {
            label: quot;Favorite Foodquot;,
            type: quot;selectquot;,
            values: [quot;Hamquot;, quot;Hammerquot;, quot;Hamburgerquot;]
        }
    },

   buttons: [
       {
           quot;typequot;: quot;submitquot;,
           quot;labelquot;: quot;Goquot;,
           quot;valuequot;: quot;goquot;
       },
       {
           quot;typequot;: quot;resetquot;,
           quot;labelquot;: quot;Resetquot;
       }
  ]
})
.submit(function() {
    $(quot;#messagequot;).html(quot;You just submit that form:<pre>quot; + $(this).serialize() + quot;</pre>quot;);
    setTimeout(function() { $(quot;#messagequot;).empty(); }, 60000);
    return false;
});
$(quot;#form1quot;).formino({
    legend: quot;jquery.form simple demoquot;,
    params: {
        quot;Titlequot;: quot;(The Title)quot;,
        quot;namequot;: {
            label: quot;Namequot;
        },
        quot;readyquot;: {
            label: quot;Ready ?quot;,
            type: quot;radioquot;,
            values: [ quot;yesquot;, quot;noquot; ]
        },
        quot;xoryorzquot;: {
            label: quot;X, Y, or Z?quot;,
            type: quot;radioquot;,
            values: [ quot;Xquot;, quot;Yquot;, quot;Zquot; ]
        },
        quot;ctoquot;: {
            label: quot;Check These Outquot;,
            type: quot;checkboxquot;,
            values: [ quot;Checkquot;, quot;Thesequot;, quot;Outquot; ]
        },
        quot;favorite_foodquot;: {
            label: quot;Favorite Foodquot;,
            type: quot;selectquot;,
            values: [quot;Hamquot;, quot;Hammerquot;, quot;Hamburgerquot;]
        }
    },

   buttons: [
       {
           quot;typequot;: quot;submitquot;,
           quot;labelquot;: quot;Goquot;,
           quot;valuequot;: quot;goquot;
       },
       {
           quot;typequot;: quot;resetquot;,
           quot;labelquot;: quot;Resetquot;
       }
  ]
})
.submit(function() {
    $(quot;#messagequot;).html(quot;You just submit that form:<pre>quot; + $(this).serialize() + quot;</pre>quot;);
    setTimeout(function() { $(quot;#messagequot;).empty(); }, 60000);
    return false;
});
$(quot;#form1quot;).formino({
    legend: quot;jquery.form simple demoquot;,
    params: {
        quot;Titlequot;: quot;(The Title)quot;,
        quot;namequot;: {
            label: quot;Namequot;
        },
        quot;readyquot;: {
            label: quot;Ready ?quot;,
            type: quot;radioquot;,
            values: [ quot;yesquot;, quot;noquot; ]
        },
        quot;xoryorzquot;: {
            label: quot;X, Y, or Z?quot;,
            type: quot;radioquot;,
            values: [ quot;Xquot;, quot;Yquot;, quot;Zquot; ]
        },
        quot;ctoquot;: {
            label: quot;Check These Outquot;,
            type: quot;checkboxquot;,
            values: [ quot;Checkquot;, quot;Thesequot;, quot;Outquot; ]
        },
        quot;favorite_foodquot;: {
            label: quot;Favorite Foodquot;,
            type: quot;selectquot;,
            values: [quot;Hamquot;, quot;Hammerquot;, quot;Hamburgerquot;]
        }
    },

   buttons: [
       {
           quot;typequot;: quot;submitquot;,
           quot;labelquot;: quot;Goquot;,
           quot;valuequot;: quot;goquot;
       },
       {
           quot;typequot;: quot;resetquot;,
           quot;labelquot;: quot;Resetquot;
       }
  ]
})
.submit(function() {
    $(quot;#messagequot;).html(quot;You just submit that form:<pre>quot; + $(this).serialize() + quot;</pre>quot;);
    setTimeout(function() { $(quot;#messagequot;).empty(); }, 60000);
    return false;
});
$(quot;#form1quot;).formino({
    legend: quot;jquery.form simple demoquot;,
    params: {
        quot;Titlequot;: quot;(The Title)quot;,
        quot;namequot;: {
            label: quot;Namequot;
        },
        quot;readyquot;: {
            label: quot;Ready ?quot;,
            type: quot;radioquot;,
            values: [ quot;yesquot;, quot;noquot; ]
        },
        quot;xoryorzquot;: {
            label: quot;X, Y, or Z?quot;,
            type: quot;radioquot;,
            values: [ quot;Xquot;, quot;Yquot;, quot;Zquot; ]
        },
        quot;ctoquot;: {
            label: quot;Check These Outquot;,
            type: quot;checkboxquot;,
            values: [ quot;Checkquot;, quot;Thesequot;, quot;Outquot; ]
        },
        quot;favorite_foodquot;: {
            label: quot;Favorite Foodquot;,
            type: quot;selectquot;,
            values: [quot;Hamquot;, quot;Hammerquot;, quot;Hamburgerquot;]
        }
    },

   buttons: [
       {
           quot;typequot;: quot;submitquot;,
           quot;labelquot;: quot;Goquot;,
           quot;valuequot;: quot;goquot;
       },
       {
           quot;typequot;: quot;resetquot;,
           quot;labelquot;: quot;Resetquot;
       }
  ]
})
.submit(function() {
    $(quot;#messagequot;).html(quot;You just submit that form:<pre>quot; + $(this).serialize() + quot;</pre>quot;);
    setTimeout(function() { $(quot;#messagequot;).empty(); }, 60000);
    return false;
});
$(quot;#form1quot;).formino({
    legend: quot;jquery.form simple demoquot;,
    params: {
        quot;Titlequot;: quot;(The Title)quot;,
        quot;namequot;: {
            label: quot;Namequot;
        },
        quot;readyquot;: {
            label: quot;Ready ?quot;,
            type: quot;radioquot;,
            values: [ quot;yesquot;, quot;noquot; ]
        },
        quot;xoryorzquot;: {
            label: quot;X, Y, or Z?quot;,
            type: quot;radioquot;,
            values: [ quot;Xquot;, quot;Yquot;, quot;Zquot; ]
        },
        quot;ctoquot;: {
            label: quot;Check These Outquot;,
            type: quot;checkboxquot;,
            values: [ quot;Checkquot;, quot;Thesequot;, quot;Outquot; ]
        },
        quot;favorite_foodquot;: {
            label: quot;Favorite Foodquot;,
            type: quot;selectquot;,
            values: [quot;Hamquot;, quot;Hammerquot;, quot;Hamburgerquot;]
        }
    },

   buttons: [
       {
           quot;typequot;: quot;submitquot;,
           quot;labelquot;: quot;Goquot;,
           quot;valuequot;: quot;goquot;
       },
       {
           quot;typequot;: quot;resetquot;,
           quot;labelquot;: quot;Resetquot;
       }
  ]
})
.submit(function() {
    $(quot;#messagequot;).html(quot;You just submit that form:<pre>quot; + $(this).serialize() + quot;</pre>quot;);
    setTimeout(function() { $(quot;#messagequot;).empty(); }, 60000);
    return false;
});
$(quot;#form1quot;).formino({
     legend: 'GoogleMap demo',
     params: [
         {
             type: 'googlemap',
             label: 'Standard Google Map ',
             name: 'm',
             value_for_latitude: '25.08532',
             value_for_longitude: '121.561499',
             zlevel: 13
         },
     ],
     buttons: [
         {
             quot;typequot;: quot;submitquot;,
             quot;labelquot;: quot;Goquot;,
             quot;valuequot;: quot;goquot;
         },
         {
             quot;typequot;: quot;resetquot;,
             quot;labelquot;: quot;Resetquot;
         }
   ]
})
$(quot;#form1quot;).formino({
     legend: 'GoogleMap demo',
     params: [
         {
             type: 'googlemap',
             label: 'Standard Google Map ',
             name: 'm',
             value_for_latitude: '25.08532',
             value_for_longitude: '121.561499',
             zlevel: 13
         },
     ],
     buttons: [
         {
             quot;typequot;: quot;submitquot;,
             quot;labelquot;: quot;Goquot;,
             quot;valuequot;: quot;goquot;
         },
         {
             quot;typequot;: quot;resetquot;,
             quot;labelquot;: quot;Resetquot;
         }
   ]
})




        “longitude=121561499;latitude=25.08532”
FYI
•       : jFormino


• http://st.handlino.com/hdc/?jFormino
• contact:
    gugod@handlino.com
    gugod@gugod.org

• http://twitter.com/gugod
• http://twitter.com/handlino
Jformino

Más contenido relacionado

Más de Kang-min Liu

The architecture of search engines in Booking.com
The architecture of search engines in Booking.comThe architecture of search engines in Booking.com
The architecture of search engines in Booking.comKang-min Liu
 
Elasticsearch 實戰介紹
Elasticsearch 實戰介紹Elasticsearch 實戰介紹
Elasticsearch 實戰介紹Kang-min Liu
 
Same but Different
Same but DifferentSame but Different
Same but DifferentKang-min Liu
 
perlbrew yapcasia 2010
perlbrew yapcasia 2010perlbrew yapcasia 2010
perlbrew yapcasia 2010Kang-min Liu
 
Good Evils In Perl (Yapc Asia)
Good Evils In Perl (Yapc Asia)Good Evils In Perl (Yapc Asia)
Good Evils In Perl (Yapc Asia)Kang-min Liu
 
Learning From Ruby (Yapc Asia)
Learning From Ruby (Yapc Asia)Learning From Ruby (Yapc Asia)
Learning From Ruby (Yapc Asia)Kang-min Liu
 
YAPC::Tiny Introduction
YAPC::Tiny IntroductionYAPC::Tiny Introduction
YAPC::Tiny IntroductionKang-min Liu
 
Integration Test With Cucumber And Webrat
Integration Test With Cucumber And WebratIntegration Test With Cucumber And Webrat
Integration Test With Cucumber And WebratKang-min Liu
 
Good Evils In Perl
Good Evils In PerlGood Evils In Perl
Good Evils In PerlKang-min Liu
 
Javascript Tutorial
Javascript TutorialJavascript Tutorial
Javascript TutorialKang-min Liu
 
Handlino - RandomLife
Handlino - RandomLifeHandlino - RandomLife
Handlino - RandomLifeKang-min Liu
 
網頁程式還可以怎麼設計
網頁程式還可以怎麼設計網頁程式還可以怎麼設計
網頁程式還可以怎麼設計Kang-min Liu
 
OSDC.tw 2008 Lightening Talk
OSDC.tw 2008 Lightening TalkOSDC.tw 2008 Lightening Talk
OSDC.tw 2008 Lightening TalkKang-min Liu
 
Happy Designer 20080329
Happy Designer 20080329Happy Designer 20080329
Happy Designer 20080329Kang-min Liu
 

Más de Kang-min Liu (19)

o̍h Tai-gi
o̍h Tai-gio̍h Tai-gi
o̍h Tai-gi
 
The architecture of search engines in Booking.com
The architecture of search engines in Booking.comThe architecture of search engines in Booking.com
The architecture of search engines in Booking.com
 
Elasticsearch 實戰介紹
Elasticsearch 實戰介紹Elasticsearch 實戰介紹
Elasticsearch 實戰介紹
 
Perlbrew
PerlbrewPerlbrew
Perlbrew
 
Same but Different
Same but DifferentSame but Different
Same but Different
 
perlbrew yapcasia 2010
perlbrew yapcasia 2010perlbrew yapcasia 2010
perlbrew yapcasia 2010
 
Git
GitGit
Git
 
Good Evils In Perl (Yapc Asia)
Good Evils In Perl (Yapc Asia)Good Evils In Perl (Yapc Asia)
Good Evils In Perl (Yapc Asia)
 
Learning From Ruby (Yapc Asia)
Learning From Ruby (Yapc Asia)Learning From Ruby (Yapc Asia)
Learning From Ruby (Yapc Asia)
 
YAPC::Tiny Introduction
YAPC::Tiny IntroductionYAPC::Tiny Introduction
YAPC::Tiny Introduction
 
Integration Test With Cucumber And Webrat
Integration Test With Cucumber And WebratIntegration Test With Cucumber And Webrat
Integration Test With Cucumber And Webrat
 
Good Evils In Perl
Good Evils In PerlGood Evils In Perl
Good Evils In Perl
 
Javascript Tutorial
Javascript TutorialJavascript Tutorial
Javascript Tutorial
 
Javascript Basic
Javascript BasicJavascript Basic
Javascript Basic
 
Handlino - RandomLife
Handlino - RandomLifeHandlino - RandomLife
Handlino - RandomLife
 
Test Continuous
Test ContinuousTest Continuous
Test Continuous
 
網頁程式還可以怎麼設計
網頁程式還可以怎麼設計網頁程式還可以怎麼設計
網頁程式還可以怎麼設計
 
OSDC.tw 2008 Lightening Talk
OSDC.tw 2008 Lightening TalkOSDC.tw 2008 Lightening Talk
OSDC.tw 2008 Lightening Talk
 
Happy Designer 20080329
Happy Designer 20080329Happy Designer 20080329
Happy Designer 20080329
 

Jformino

  • 3. jQuery Form by Handlino
  • 5.
  • 8. Simple Example $(quot;<div/>quot;) .attr({ id: quot;form1quot; }) .prependTo(document.body) .formino({ legend: quot;Test Purpose Formquot;, params: [ quot;field_onequot; ] });
  • 9. Extended Example $(quot;<div/>quot;).attr({ id: quot;form1quot; }).prependTo(document.body) .formino({ legend: quot;Test Purpose Formquot;, params: [ // only give field name, with auto-generateed label. quot;field_onequot;, // manually assign a label { label: quot;Fooquot;, name: quot;foo_fieldquot; }, // with initial value { label: quot;Barquot;, name: quot;bar_fieldquot;, value: quot;42quot; }, // other types { name: quot;xyzquot;, label: quot;XYZquot;, type: quot;checkboxquot;, values: [ 42, 43, 44 ] } ] });
  • 10. Google Map $(quot;#form1quot;).formino({ legend: 'GoogleMap demo', params: [ { label: 'Standard Google Map ', name: 'm', type: 'googlemap', value_for_latitude: '25.08532', value_for_longitude: '121.561499', zlevel: 13 }, ], buttons: [ { quot;typequot;: quot;submitquot;, quot;labelquot;: quot;Goquot;, quot;valuequot;: quot;goquot; }, { quot;typequot;: quot;resetquot;, quot;labelquot;: quot;Resetquot; } ] })
  • 11. Google Map $(quot;#form1quot;).formino({ legend: 'GoogleMap demo', params: [ { label: 'Standard Google Map ', name: 'm', type: 'googlemap', value_for_latitude: '25.08532', value_for_longitude: '121.561499', zlevel: 13 }, ], buttons: [ { quot;typequot;: quot;submitquot;, quot;labelquot;: quot;Goquot;, quot;valuequot;: quot;goquot; }, { quot;typequot;: quot;resetquot;, quot;labelquot;: quot;Resetquot; } ] })
  • 12. Google Map $(quot;#form1quot;).formino({ legend: 'GoogleMap demo', params: [ { label: 'Standard Google Map ', name: 'm', type: 'googlemap', value_for_latitude: '25.08532', value_for_longitude: '121.561499', zlevel: 13 }, ], buttons: [ { quot;typequot;: quot;submitquot;, quot;labelquot;: quot;Goquot;, quot;valuequot;: quot;goquot; }, { quot;typequot;: quot;resetquot;, quot;labelquot;: quot;Resetquot; } ] })
  • 13.
  • 14. Form Element UI Binder
  • 15. $(quot;input#fooquot;).formino({ act_as: 'datetime-calendar', buttons: [ { type: quot;submitquot;, label: quot;OKquot; }, { type: quot;cancelquot;, label: quot;Nevermindquot; }, { label: quot;Helloquot;, click: function(selected_date) { $(quot;#messagequot;) .text( quot;Hello, you select quot; + selected_date.toString() ); } } ] });
  • 16. $(quot;input#fooquot;).formino({ act_as: 'datetime-calendar', buttons: [ { type: quot;submitquot;, label: quot;OKquot; }, { type: quot;cancelquot;, label: quot;Nevermindquot; }, { label: quot;Helloquot;, click: function(selected_date) { $(quot;#messagequot;) .text( quot;Hello, you select quot; + selected_date.toString() ); } } ] });
  • 17. $(quot;input#fooquot;).formino({ act_as: 'datetime-calendar', buttons: [ { type: quot;submitquot;, label: quot;OKquot; }, { type: quot;cancelquot;, label: quot;Nevermindquot; }, { label: quot;Helloquot;, click: function(selected_date) { $(quot;#messagequot;) .text( quot;Hello, you select quot; + selected_date.toString() ); } } ] });
  • 18. $(quot;input#fooquot;).formino({ act_as: 'datetime-calendar', buttons: [ { type: quot;submitquot;, label: quot;OKquot; }, { type: quot;cancelquot;, label: quot;Nevermindquot; }, { label: quot;Helloquot;, click: function(selected_date) { $(quot;#messagequot;) .text( quot;Hello, you select quot; + selected_date.toString() ); } } ] }); YUI Skin compatible CSS
  • 34. • Primitives • text, password, select, radio, checkbox • Extended • Date, Time, Date+Time • Google Map • Date Range, Ranged Value
  • 36. $(quot;#form1quot;).formino({ legend: quot;jquery.form simple demoquot;, params: { quot;Titlequot;: quot;(The Title)quot;, quot;namequot;: { label: quot;Namequot; }, quot;readyquot;: { label: quot;Ready ?quot;, type: quot;radioquot;, values: [ quot;yesquot;, quot;noquot; ] }, quot;xoryorzquot;: { label: quot;X, Y, or Z?quot;, type: quot;radioquot;, values: [ quot;Xquot;, quot;Yquot;, quot;Zquot; ] }, quot;ctoquot;: { label: quot;Check These Outquot;, type: quot;checkboxquot;, values: [ quot;Checkquot;, quot;Thesequot;, quot;Outquot; ] }, quot;favorite_foodquot;: { label: quot;Favorite Foodquot;, type: quot;selectquot;, values: [quot;Hamquot;, quot;Hammerquot;, quot;Hamburgerquot;] } }, buttons: [ { quot;typequot;: quot;submitquot;, quot;labelquot;: quot;Goquot;, quot;valuequot;: quot;goquot; }, { quot;typequot;: quot;resetquot;, quot;labelquot;: quot;Resetquot; } ] }) .submit(function() { $(quot;#messagequot;).html(quot;You just submit that form:<pre>quot; + $(this).serialize() + quot;</pre>quot;); setTimeout(function() { $(quot;#messagequot;).empty(); }, 60000); return false; });
  • 37. $(quot;#form1quot;).formino({ legend: quot;jquery.form simple demoquot;, params: { quot;Titlequot;: quot;(The Title)quot;, quot;namequot;: { label: quot;Namequot; }, quot;readyquot;: { label: quot;Ready ?quot;, type: quot;radioquot;, values: [ quot;yesquot;, quot;noquot; ] }, quot;xoryorzquot;: { label: quot;X, Y, or Z?quot;, type: quot;radioquot;, values: [ quot;Xquot;, quot;Yquot;, quot;Zquot; ] }, quot;ctoquot;: { label: quot;Check These Outquot;, type: quot;checkboxquot;, values: [ quot;Checkquot;, quot;Thesequot;, quot;Outquot; ] }, quot;favorite_foodquot;: { label: quot;Favorite Foodquot;, type: quot;selectquot;, values: [quot;Hamquot;, quot;Hammerquot;, quot;Hamburgerquot;] } }, buttons: [ { quot;typequot;: quot;submitquot;, quot;labelquot;: quot;Goquot;, quot;valuequot;: quot;goquot; }, { quot;typequot;: quot;resetquot;, quot;labelquot;: quot;Resetquot; } ] }) .submit(function() { $(quot;#messagequot;).html(quot;You just submit that form:<pre>quot; + $(this).serialize() + quot;</pre>quot;); setTimeout(function() { $(quot;#messagequot;).empty(); }, 60000); return false; });
  • 38. $(quot;#form1quot;).formino({ legend: quot;jquery.form simple demoquot;, params: { quot;Titlequot;: quot;(The Title)quot;, quot;namequot;: { label: quot;Namequot; }, quot;readyquot;: { label: quot;Ready ?quot;, type: quot;radioquot;, values: [ quot;yesquot;, quot;noquot; ] }, quot;xoryorzquot;: { label: quot;X, Y, or Z?quot;, type: quot;radioquot;, values: [ quot;Xquot;, quot;Yquot;, quot;Zquot; ] }, quot;ctoquot;: { label: quot;Check These Outquot;, type: quot;checkboxquot;, values: [ quot;Checkquot;, quot;Thesequot;, quot;Outquot; ] }, quot;favorite_foodquot;: { label: quot;Favorite Foodquot;, type: quot;selectquot;, values: [quot;Hamquot;, quot;Hammerquot;, quot;Hamburgerquot;] } }, buttons: [ { quot;typequot;: quot;submitquot;, quot;labelquot;: quot;Goquot;, quot;valuequot;: quot;goquot; }, { quot;typequot;: quot;resetquot;, quot;labelquot;: quot;Resetquot; } ] }) .submit(function() { $(quot;#messagequot;).html(quot;You just submit that form:<pre>quot; + $(this).serialize() + quot;</pre>quot;); setTimeout(function() { $(quot;#messagequot;).empty(); }, 60000); return false; });
  • 39. $(quot;#form1quot;).formino({ legend: quot;jquery.form simple demoquot;, params: { quot;Titlequot;: quot;(The Title)quot;, quot;namequot;: { label: quot;Namequot; }, quot;readyquot;: { label: quot;Ready ?quot;, type: quot;radioquot;, values: [ quot;yesquot;, quot;noquot; ] }, quot;xoryorzquot;: { label: quot;X, Y, or Z?quot;, type: quot;radioquot;, values: [ quot;Xquot;, quot;Yquot;, quot;Zquot; ] }, quot;ctoquot;: { label: quot;Check These Outquot;, type: quot;checkboxquot;, values: [ quot;Checkquot;, quot;Thesequot;, quot;Outquot; ] }, quot;favorite_foodquot;: { label: quot;Favorite Foodquot;, type: quot;selectquot;, values: [quot;Hamquot;, quot;Hammerquot;, quot;Hamburgerquot;] } }, buttons: [ { quot;typequot;: quot;submitquot;, quot;labelquot;: quot;Goquot;, quot;valuequot;: quot;goquot; }, { quot;typequot;: quot;resetquot;, quot;labelquot;: quot;Resetquot; } ] }) .submit(function() { $(quot;#messagequot;).html(quot;You just submit that form:<pre>quot; + $(this).serialize() + quot;</pre>quot;); setTimeout(function() { $(quot;#messagequot;).empty(); }, 60000); return false; });
  • 40. $(quot;#form1quot;).formino({ legend: quot;jquery.form simple demoquot;, params: { quot;Titlequot;: quot;(The Title)quot;, quot;namequot;: { label: quot;Namequot; }, quot;readyquot;: { label: quot;Ready ?quot;, type: quot;radioquot;, values: [ quot;yesquot;, quot;noquot; ] }, quot;xoryorzquot;: { label: quot;X, Y, or Z?quot;, type: quot;radioquot;, values: [ quot;Xquot;, quot;Yquot;, quot;Zquot; ] }, quot;ctoquot;: { label: quot;Check These Outquot;, type: quot;checkboxquot;, values: [ quot;Checkquot;, quot;Thesequot;, quot;Outquot; ] }, quot;favorite_foodquot;: { label: quot;Favorite Foodquot;, type: quot;selectquot;, values: [quot;Hamquot;, quot;Hammerquot;, quot;Hamburgerquot;] } }, buttons: [ { quot;typequot;: quot;submitquot;, quot;labelquot;: quot;Goquot;, quot;valuequot;: quot;goquot; }, { quot;typequot;: quot;resetquot;, quot;labelquot;: quot;Resetquot; } ] }) .submit(function() { $(quot;#messagequot;).html(quot;You just submit that form:<pre>quot; + $(this).serialize() + quot;</pre>quot;); setTimeout(function() { $(quot;#messagequot;).empty(); }, 60000); return false; });
  • 41. $(quot;#form1quot;).formino({ legend: quot;jquery.form simple demoquot;, params: { quot;Titlequot;: quot;(The Title)quot;, quot;namequot;: { label: quot;Namequot; }, quot;readyquot;: { label: quot;Ready ?quot;, type: quot;radioquot;, values: [ quot;yesquot;, quot;noquot; ] }, quot;xoryorzquot;: { label: quot;X, Y, or Z?quot;, type: quot;radioquot;, values: [ quot;Xquot;, quot;Yquot;, quot;Zquot; ] }, quot;ctoquot;: { label: quot;Check These Outquot;, type: quot;checkboxquot;, values: [ quot;Checkquot;, quot;Thesequot;, quot;Outquot; ] }, quot;favorite_foodquot;: { label: quot;Favorite Foodquot;, type: quot;selectquot;, values: [quot;Hamquot;, quot;Hammerquot;, quot;Hamburgerquot;] } }, buttons: [ { quot;typequot;: quot;submitquot;, quot;labelquot;: quot;Goquot;, quot;valuequot;: quot;goquot; }, { quot;typequot;: quot;resetquot;, quot;labelquot;: quot;Resetquot; } ] }) .submit(function() { $(quot;#messagequot;).html(quot;You just submit that form:<pre>quot; + $(this).serialize() + quot;</pre>quot;); setTimeout(function() { $(quot;#messagequot;).empty(); }, 60000); return false; });
  • 42. $(quot;#form1quot;).formino({ legend: quot;jquery.form simple demoquot;, params: { quot;Titlequot;: quot;(The Title)quot;, quot;namequot;: { label: quot;Namequot; }, quot;readyquot;: { label: quot;Ready ?quot;, type: quot;radioquot;, values: [ quot;yesquot;, quot;noquot; ] }, quot;xoryorzquot;: { label: quot;X, Y, or Z?quot;, type: quot;radioquot;, values: [ quot;Xquot;, quot;Yquot;, quot;Zquot; ] }, quot;ctoquot;: { label: quot;Check These Outquot;, type: quot;checkboxquot;, values: [ quot;Checkquot;, quot;Thesequot;, quot;Outquot; ] }, quot;favorite_foodquot;: { label: quot;Favorite Foodquot;, type: quot;selectquot;, values: [quot;Hamquot;, quot;Hammerquot;, quot;Hamburgerquot;] } }, buttons: [ { quot;typequot;: quot;submitquot;, quot;labelquot;: quot;Goquot;, quot;valuequot;: quot;goquot; }, { quot;typequot;: quot;resetquot;, quot;labelquot;: quot;Resetquot; } ] }) .submit(function() { $(quot;#messagequot;).html(quot;You just submit that form:<pre>quot; + $(this).serialize() + quot;</pre>quot;); setTimeout(function() { $(quot;#messagequot;).empty(); }, 60000); return false; });
  • 43. $(quot;#form1quot;).formino({ legend: quot;jquery.form simple demoquot;, params: { quot;Titlequot;: quot;(The Title)quot;, quot;namequot;: { label: quot;Namequot; }, quot;readyquot;: { label: quot;Ready ?quot;, type: quot;radioquot;, values: [ quot;yesquot;, quot;noquot; ] }, quot;xoryorzquot;: { label: quot;X, Y, or Z?quot;, type: quot;radioquot;, values: [ quot;Xquot;, quot;Yquot;, quot;Zquot; ] }, quot;ctoquot;: { label: quot;Check These Outquot;, type: quot;checkboxquot;, values: [ quot;Checkquot;, quot;Thesequot;, quot;Outquot; ] }, quot;favorite_foodquot;: { label: quot;Favorite Foodquot;, type: quot;selectquot;, values: [quot;Hamquot;, quot;Hammerquot;, quot;Hamburgerquot;] } }, buttons: [ { quot;typequot;: quot;submitquot;, quot;labelquot;: quot;Goquot;, quot;valuequot;: quot;goquot; }, { quot;typequot;: quot;resetquot;, quot;labelquot;: quot;Resetquot; } ] }) .submit(function() { $(quot;#messagequot;).html(quot;You just submit that form:<pre>quot; + $(this).serialize() + quot;</pre>quot;); setTimeout(function() { $(quot;#messagequot;).empty(); }, 60000); return false; });
  • 44. $(quot;#form1quot;).formino({ legend: 'GoogleMap demo', params: [ { type: 'googlemap', label: 'Standard Google Map ', name: 'm', value_for_latitude: '25.08532', value_for_longitude: '121.561499', zlevel: 13 }, ], buttons: [ { quot;typequot;: quot;submitquot;, quot;labelquot;: quot;Goquot;, quot;valuequot;: quot;goquot; }, { quot;typequot;: quot;resetquot;, quot;labelquot;: quot;Resetquot; } ] })
  • 45. $(quot;#form1quot;).formino({ legend: 'GoogleMap demo', params: [ { type: 'googlemap', label: 'Standard Google Map ', name: 'm', value_for_latitude: '25.08532', value_for_longitude: '121.561499', zlevel: 13 }, ], buttons: [ { quot;typequot;: quot;submitquot;, quot;labelquot;: quot;Goquot;, quot;valuequot;: quot;goquot; }, { quot;typequot;: quot;resetquot;, quot;labelquot;: quot;Resetquot; } ] }) “longitude=121561499;latitude=25.08532”
  • 46. FYI
  • 47. : jFormino • http://st.handlino.com/hdc/?jFormino • contact: gugod@handlino.com gugod@gugod.org • http://twitter.com/gugod • http://twitter.com/handlino