Page MenuHomePhabricator

HtmlForm unconditionally loads form values from request
Closed, InvalidPublic

Description

There should be a way to disable the automatic data loading. Consider a case where you fill a form to enter some data, and then you can use the same form to enter new entry as well.


Version: 1.20.x
Severity: enhancement

Details

Reference
bz36210

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 12:22 AM
bzimport added a project: MediaWiki-General.
bzimport set Reference to bz36210.
bzimport added a subscriber: Unknown Object (MLST).
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptSep 23 2015, 10:59 PM
Ricordisamoa set Security to None.

What's the status of this? This is blocking T48248, making some special pages hard to use on mobile.

Florian claimed this task.Jun 23 2016, 12:03 AM

Hmm, this sounds like a reasonable case and therefore a reasonable request. Let me look into it :)

Florian closed this task as Declined.Jun 23 2016, 12:08 AM

Wait, HTMLForm already supports a similar feature, based on fields, not the entire form. Simply put a 'nodata' => true into the field descriptor and HTMLForm will load the default but not the data from the request.

If this isn't what you need, feel free to reopen and describe the exact use case :)

Florian changed the task status from Declined to Invalid.Jun 23 2016, 12:08 AM

Wait, HTMLForm already supports a similar feature, based on fields, not the entire form. Simply put a 'nodata' => true into the field descriptor and HTMLForm will load the default but not the data from the request.
If this isn't what you need, feel free to reopen and describe the exact use case :)

Thank you, nodata seems to work! It should definitely get documented somewhere...