[Koha-bugs] [Bug 34671] Collapsing fields in patron form allows saving without mandatory fields
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Fri Nov 17 11:08:48 CET 2023
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34671
--- Comment #22 from Emmi Takkinen <emmi.takkinen at koha-suomi.fi> ---
(In reply to Marcel de Rooy from comment #20)
> + ignore: "",
> Default should be :hidden. Does this make a difference?
Hmm, if ignore setting isn't set then yes, default is ":hidden". That's why it
has to be set as ignore: "" so that all fields are validated no matter if
they're hidden or not. If we add class to this setting, only those fields are
ignored.
> Comparing with
> + if($(".new_guarantor_relationship").is(":hidden")){
> + $(".new_guarantor_relationship").addClass("ignore_validation");
> + }
>
> - ignore: "",
> + ignore: ".ignore_validation",
>
> Also third patch.
> My first thought here is that we are doing things too complicated?
How form validation works does make things complicated because the way it works
(as stated above). I did at one point test if we could leave class "required"
out if field is hidden but I can't remember if it's even possible or less
complicated to achieve than new class.
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list