Note:

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

Talk:lib/formslib.php Form Definition: Difference between revisions

From MoodleDocs
No edit summary
Line 6: Line 6:


Why are static elements listed as being used with care?
Why are static elements listed as being used with care?
== ''Please do not create conditional elements in definition(), the definition() should not directly depend on the submitted data.'' ==
I'm really not sure what this means. Does it actually mean "do not create elements that are conditional upon the values of other submitted elements" as opposed to not creating conditional elements at all? Lots of forms have conditional elements --[[User:Howard Miller|Howard Miller]] 13:06, 6 February 2011 (UTC)

Revision as of 13:06, 6 February 2011

There's items on here (e.g. 'duration') that are 2.0 only. Please can people adding them mark them as such to avoid confusion. Ta --Howard Miller 11:42, 23 July 2009 (UTC)

Hi Howard, You can just add {{Moodle 2.0}} to those items. I did that for 'duration'. --Frank Ralf 11:54, 23 July 2009 (UTC)

Use Static elements with care?

Why are static elements listed as being used with care?

Please do not create conditional elements in definition(), the definition() should not directly depend on the submitted data.

I'm really not sure what this means. Does it actually mean "do not create elements that are conditional upon the values of other submitted elements" as opposed to not creating conditional elements at all? Lots of forms have conditional elements --Howard Miller 13:06, 6 February 2011 (UTC)