Comment 2 for bug 1667521

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/8410
Committed: https://git.mahara.org/mahara/mahara/commit/d850130c4d2ef2a720b4a7885fa489ad1c84ba49
Submitter: Cecilia Vela Gurovic (<email address hidden>)
Branch: master

commit d850130c4d2ef2a720b4a7885fa489ad1c84ba49
Author: Gregor Anzelj <email address hidden>
Date: Mon Jan 8 15:34:37 2018 +0100

Bug 1667521: Make 'Registration reason' mandatory when 'Confirm registration' is turned on

We achieve this by having a new pieform rule called 'requiredby' where
we can reference another field and when a certain value is set in that
field it makes this field required.

requiredby rule needs an array containing:
- the 'reference', a string of the name of the related field within the same form
- the 'required', an array containing the values of 'reference' element as keys
and true/1 for value if this element is required.
-- If the reference field returns true/false then required array would
have either 'true' => 1 or 'false' => 1 depending on what setting
is needed

behatnotneeded

Change-Id: I9bc5d15b4035d4a11b81b9355a32044c66ee2199