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

StatusSubtypeAssignedTask
OpenNone
OpenNone
OpenNone
ResolvedMarkTraceur
Resolvedmatmarex
Resolvedmatmarex
Resolvedmatmarex
Resolvedmatmarex
DuplicateNone
InvalidNone
ResolvedJdlrobson
ResolvedBUG REPORTmatmarex
Resolvedmatmarex
OpenNone
Resolved Esanders
DuplicateNone
ResolvedTTO
ResolvedJayprakash12345
DuplicateNone
ResolvedJdlrobson
ResolvedIsarra
Resolvedmatmarex

Event Timeline

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 triaged this task as Medium priority.

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

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

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