Page MenuHomePhabricator

hide-if doesn't work in OOUI HTMLForm
Closed, ResolvedPublic

Description

Going through htmlform or whatever you use 'hide-if' for a field to hide it when something is selected/checked/whatever. Expected behaviour is for this to hide it.

Example in getFormFields():

$fields['blah'] = [
	'type' => 'text',
	'hide-if' => [ '===', 'previousthing', 'new' ]
];

This should hide it. But it doesn't.

This is currently one of the things blocking the conversion of the login form to ooui, but also just plain problematic in general because it's used a lot of other places too.

Related Objects

StatusAssignedTask
ResolvedEsanders
OpenNone
OpenNone
OpenNone
ResolvedMarkTraceur
Resolvedmatmarex
Resolvedmatmarex
Resolvedmatmarex
OpenNone
OpenNone
OpenNone
ResolvedJdlrobson
Resolvedmatmarex
Resolvedmatmarex
OpenNone
OpenNone
ResolvedEsanders
DuplicateNone
ResolvedTTO
ResolvedJayprakash12345
DuplicateNone
OpenNone
ResolvedIsarra
Resolvedmatmarex

Event Timeline

Isarra created this task.Jul 28 2016, 7:14 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJul 28 2016, 7:14 PM
Legoktm renamed this task from hide-if doesn't work in ooui to hide-if doesn't work in OOUI HTMLForm.Jul 28 2016, 8:46 PM

Change 302106 had a related patch set uploaded (by Bartosz Dziewoński):
Support 'hide-if' parameters in OOUI HTMLForm

https://gerrit.wikimedia.org/r/302106

matmarex claimed this task.Jul 31 2016, 4:21 PM
matmarex triaged this task as Normal priority.

@Isarra I'd appreciate if you could verify that this patch works with CollaborationKit's forms.

Jdforrester-WMF moved this task from Backlog to Doing on the OOUI board.Aug 16 2016, 9:21 PM

Change 302106 merged by jenkins-bot:
Support 'hide-if' parameters in OOUI HTMLForm

https://gerrit.wikimedia.org/r/302106

matmarex closed this task as Resolved.Aug 22 2016, 4:09 PM
matmarex removed a project: Patch-For-Review.