PDA

View Full Version : Want to show submit button only if something changes on form



Srikanth474
13 Jul 2013, 4:40 PM
Hi,

I am using Ext js 4.1.0 , i want to show submit button only if user changes something on the form fields,
what will be the best way of doing this,

i know i can use change listener in each and every field, but want to know if there is any other way of doing it.

Thanks in Advance
Srikanth

skirtle
14 Jul 2013, 4:48 PM
Maybe a dirtychange listener on a surrounding form?

If you're using controllers you wouldn't have to register a listener on each individual field, you'd just craft a selector that picks up all fields below a suitable container.