If you want to create a new page for developers, you should create it on the Moodle Developer Resource site.


From MoodleDocs
Revision as of 14:26, 27 May 2022 by Sara Arjona Téllez (talk | contribs) (This page will not be migrated to new devdocs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Warning: This page is no longer in use. The information contained on the page should NOT be seen as relevant or reliable.

Moodle User Interface Guidelines > Form

Note: This page is a work-in-progress. Feedback and suggested improvements are welcome. Please join the discussion on or use the page comments.

This is a guideline template for a Moodle Interface Guideline. Comments: developer forum thread


You want to allow users to enter information into the application.

Forces: factors that affect selection

  • There may not be much space. Forms elements are typically verbose and forms require at least a submit button.


Moodle uses progressive disclosure to hide form items that are suspected to be needed a minority of users.

On simple forms, (less than one page / four elements or less) autofocus the first field of the form on body onload

Date selection: use javascript selector (how about time?)

  • Show the more important settings at the top
  • Each entry should have a label, and if necessary, a help file
  • If there are more than 10 options, split them into required and optional/extra/advanced parameters

Common mistakes

Autofocusing a field by default is an accessibility issue, see MDL-20410

Examples and implementation

Site configuration forms

Module configuration forms ("Update this Forum")

Related guidelines

Related issues in the tracker

  • TODO: Configuration defaults
  • TODO: Inconsistency with buttons in each module configuration: save and return to course / save and display / cancel. Are there really use cases to support having this choice each time?

Further information / Sources