W3C home > Mailing lists > Public > www-forms@w3.org > October 2005

Disabling a button based on validity

From: Erik Bruchez <erik@bruchez.org>
Date: Tue, 25 Oct 2005 17:32:22 +0200
Message-ID: <435E5006.2030606@bruchez.org>
To: www-forms@w3.org

All,

I am having trouble figuring out the solution to an extremely basic UI
requirement: disabling a submit button, implemented either with
xforms:submit or xforms:trigger, until certain fields have been filled
out correctly by the user.

Of course, you could leave the button always enabled. Upon XForms
submission, if the submitted instance is not valid or has missing
required fields, submission will fail, throw an xforms-submit-error,
and you can notify the user of the failure. But from a usability
perspective, this is usually a bad solution.

So these are my questions:

1. How do people address this UI requirement today with XForms? Is
    there a way of doing this purely based on the XForms 1.0
    specification? If not, are there workarounds? For example, we have
    played with counting xforms-valid and xforms-invalid events,
    clearly a quite heavy solution.

2. If the answer to #1 above is "no" or "here is a way, but it's
    really a dirty hack":

    2.1. Is the WG working on addressing this? (I should talk with
         Sebastian but it doesn't hurt to ask this publicly.)

    2.2. Are there extensions suggested or implemented by existing
         XForms engines that address this?

Thanks,

-Erik
Received on Tuesday, 25 October 2005 15:32:24 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 10 March 2012 06:22:02 GMT