Fixed
Details
Priority
MinorAssignee
AlexAlexReporter
AlexAlexDeveloper
AlexAlexChange Log Message
Adds improvements to FormManager classPatch Instructions
Patches must be submitted through Phabricator.
To submit patch via Command Line use Patches Workflow (via Arcanist) tutorial.
To submit patch via Web Interface use Patches Workflow (via Web Interface) tutorial.
External issue ID
1295External issue URL
Story Points
1Fix versions
Affects versions
Details
Details
Priority
Assignee
Alex
AlexReporter
Alex
AlexDeveloper
Alex
AlexChange Log Message
Adds improvements to FormManager class
Patch Instructions
Patches must be submitted through Phabricator.
To submit patch via Command Line use Patches Workflow (via Arcanist) tutorial.
To submit patch via Web Interface use Patches Workflow (via Web Interface) tutorial.
External issue ID
1295
External issue URL
Story Points
1
Fix versions
Affects versions
Created May 18, 2012 at 10:54 AM
Updated December 30, 2024 at 2:21 AM
Resolved July 25, 2012 at 10:30 AM
In In-Portal we've developed FormManager class, that is used to manage forms that are submitted and validated through ajax.
I wanted to share several improvements we've made to original version we've used quite a lot over last years:
set error into a field before form is registered
set form-specific template to be used in all ajax calls
perform immediate validation for inputs on blur event, but for other controls (like radio buttons) in click event
if event, called through AjaxFormHelper::transitEvent method requested a redirect to another page (e.g. by setting $event->redirect property), then automatically perform redirect
watermarks were not removed when using immediate field validation
watermark removal code (that was called before form submit) first removed watermarks and then restored them, but should be restoring original values in these fields
error were not removed from form after it was closed by user (without submitting)