Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-39280

multiselect mform element is not suitable for disableif method

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.5
    • Fix Version/s: 2.4.5, 2.5.1
    • Component/s: Forms Library
    • Labels:
    • Testing Instructions:
      Hide
      • To be performed on major browsers (IE8/9 + Firefox|Chrome)
      1. Play with the attached file test_form_data.php.
      2. Make sure the disabledIf works expected on
        • Multiple select
        • Single select
        • Checkboxes
        • Radio button
        • Other elements supported
      3. Browse Moodle and Make sure the disabledIf works, try at least:
        • Date selector with 'Enabled' checkbox
        • Datetime selector
        • Some sensible forms...
      Show
      To be performed on major browsers (IE8/9 + Firefox|Chrome) Play with the attached file test_form_data.php . Make sure the disabledIf works expected on Multiple select Single select Checkboxes Radio button Other elements supported Browse Moodle and Make sure the disabledIf works, try at least: Date selector with 'Enabled' checkbox Datetime selector Some sensible forms...
    • Affected Branches:
      MOODLE_25_STABLE
    • Fixed Branches:
      MOODLE_24_STABLE, MOODLE_25_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-39280-master-int

      Description

      As discussed in MDL-30940 I open this issue because it seems it is not possible to disable a mform element on the basis of the selections provided to a multiselect mform element.
      Attached is a very simple mform explaining the issue. I tried 4 differnt ways to disable a simple select starting from the selection in a multiselect mform element, but I have not been successful.
      Change the line 36 to verify all my attempts.

        Attachments

        1. multiselect.php
          2 kB
          Daniele Cordella
        2. test_form_data_rev2.php
          2 kB
          Daniele Cordella
        3. test_form_data.php
          2 kB
          Frédéric Massart

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  8/Jul/13