Disable save button after clicked

A place for users and developers of the Xataface to discuss and receive support.

Disable save button after clicked

Postby kevinwen » Thu Apr 15, 2010 3:19 pm

Hi, Steve

My application needs to disable the save button after data is validated so we can avoid multiple submissions with same data to the server. I think this is a great feature that Xataface should have. I just added the following code after line 1785 in xataface/lib/HTML/QuickForm.php:

Code: Select all
                "  var frmInputs = frm.getElementsByTagName('INPUT');\n" .
                "  for (var i=0; i< frmInputs.length; i++) {\n" .
                "    if (frmInputs[i].type == 'submit') { \n" .
                "      frmInputs[i].disabled = 'disabled';\n" .
                "    } \n" .
                "  }\n" .


The attachments are the QuickForm.php with the code above and the original one. Would you be able to include this feature into the framework after it's verified on your end so we don't have to worry about the upgrade later on?


Kevin
Attachments
QuickForm.php.jpg
QuickForm.php.jpg (102.6 KiB) Viewed 2838 times
kevinwen
 
Posts: 109
Joined: Mon Dec 28, 2009 3:44 pm

Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 24 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved