Forms 31: Difference between revisions
(info box) |
(Summary for each of the different topics) |
||
Line 8: | Line 8: | ||
=Forms for 3.1= | =Forms for 3.1= | ||
The main driving forces behind updating the forms library are a desire to create forms in JavaScript, and to make the current mforms work in php 7. | |||
==Updating mforms== | |||
Moodle currently uses mforms to create most of it's forms. We will be keeping this existing framework as a lot of work has been put in to customise it to Moodle and it still works; will maintain backwards compatibility; and will allow a gradual move to a different framework if required. Typical php forms are expected to still use this library. | |||
===php 7=== | |||
Currently mforms doesn't work with php 7. This is mainly due to the use of the old constructor definition. We currently have MDL-52081 to fix the constructor throughout Moodle, including the mforms. | |||
===Mustache templates=== | |||
Mustache templates have been introduced into Moodle. The current mform elements will be moved over to use the templates and become renderable. MDL-52144 is the issue number for updating the 'text' form element. See the epic issue for the full list of form elements being updated to use mustache templates. | |||
==JavaScript forms== | |||
Currently we have no library for creating a form in JavaScript. We need a library so that navigation and error handling are done in an accessible way. | |||
===Populating a form=== | |||
===Retrieving all information from a form ready for AJAX=== | |||
MDL-52145 | |||
===Form validation=== | |||
MDL-52146 | |||
===Form definition=== | |||
MDL-52147 |
Revision as of 06:51, 16 November 2015
Forms improvements targeted for Moodle 3.1 | |
---|---|
Project state | Planning |
Tracker issue | MDL-52143 |
Discussion | https://devpad.moodle.org/p/new_forms_lib, https://moodle.org/mod/forum/discuss.php?d=322751 |
Assignee | Adrian Greeve |
Forms for 3.1
The main driving forces behind updating the forms library are a desire to create forms in JavaScript, and to make the current mforms work in php 7.
Updating mforms
Moodle currently uses mforms to create most of it's forms. We will be keeping this existing framework as a lot of work has been put in to customise it to Moodle and it still works; will maintain backwards compatibility; and will allow a gradual move to a different framework if required. Typical php forms are expected to still use this library.
php 7
Currently mforms doesn't work with php 7. This is mainly due to the use of the old constructor definition. We currently have MDL-52081 to fix the constructor throughout Moodle, including the mforms.
Mustache templates
Mustache templates have been introduced into Moodle. The current mform elements will be moved over to use the templates and become renderable. MDL-52144 is the issue number for updating the 'text' form element. See the epic issue for the full list of form elements being updated to use mustache templates.
JavaScript forms
Currently we have no library for creating a form in JavaScript. We need a library so that navigation and error handling are done in an accessible way.