Dojo Dijit and HTML5 in Real world applications/Dijit/dijit.form.Form

From PMISwiki
Jump to: navigation, search

dijit.form.Form

Tips and tricks

If your dijit.form.Form is not sent to the server it is likely that you forgot to specify the data-dojo-props:

    <form id="myForm" action="myServerFile.php" method="post" name="myForm"
                data-dojo-type="dijit.form.Form"
                data-dojo-props=" name:  'myForm',
                                  action:'myServerFile.php', 
                                  method:'post'">
    <!-- form elements -->
    </form>

Some IE versions has difficulties with dijit forms, therefore, it is advisable to use the <div> tag instead:

    <div id="myForm" action="myServerFile.php" method="post" name="myForm"
                data-dojo-type="dijit.form.Form"
                data-dojo-props=" name:  'myForm',
                                  action:'myServerFile.php', 
                                  method:'post'">
    <!-- form elements -->
    </div>

References