General developer forum

Hiding form fields

 
Davo
Hiding form fields
Core developersParticularly helpful MoodlersPlugin developers

In Moodle 3.4 a new form function was introduced 'hideIf' - this works exactly the same as 'disabledIf' (you can directly search + replace the function names, if you want to), but instead of the field being disabled, the field is hidden (along with the label).

Now this functionality is available, I've been asked to propose that it should be used across a number of Moodle core forms. I've created a ticket MDL-61014 which is the result of a partial review of the uses of disabledIf in Moodle core and proposes a number of places where I think it would be beneficial to use hideIf instead (so far, I've reviewed about 2/3 of the uses of disabledIf, I'll review the rest once I've had confirmation that the basic approach I'm taking is viable).

I'd really appreciate some feedback on this.

Thanks.


 
Average of ratings: Useful (1)