Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Minor
-
Resolution: Unresolved
-
Affects Version/s: 1.9.5
-
Fix Version/s: None
-
Component/s: Forms Library
-
Labels:None
-
Affected Branches:MOODLE_19_STABLE
Description
create a moodleform
add a field like, for instance:
$mform->addElement('text', 'fieldname', get_string('fieldname','newmodule'));
$mform->addRule('fieldname', get_string('required'), 'required', null, 'client');
Be sure this is the ONLY required field.
In the function definition_after_data() {
type:
if ($mycondition) {
$mform->removeElement('fieldname');
}
Run the form.
Even if $mycondition == true
at the bottom of the form in the web browser it is written:
There are required fields in this form marked*
Thanks for reporting this issue.
We have detected that this issue has been inactive for over a year has been recorded as affecting versions that are no longer supported.
If you believe that this issue is still relevant to current versions (2.1 and beyond), please comment on the issue. Issues left inactive for a further month will be closed.
Michael d;
lqjjLKA0p6