ask dialogue - empty vs. cancel
Posted: Wed Apr 13, 2011 9:23 pm
With the ask dialogue, is there a way to differentiate between an empty response and the user hitting cancel?
Here's the scenario: I have an email field populated with data (if it exists). If the user clicks on the field, "ask" will come up, pre-populated with the email from the field (for easier editing). If the user hits cancel, I want nothing to change, but if the user deletes the email and hits OK with an empty field, I want the field to be cleared.
The problem is that "it" appears to never be "cancel" with an ask dialogue, so the user hitting cancel and the user clearing the field both trigger "if it is empty".
Suggestions?
Here's the scenario: I have an email field populated with data (if it exists). If the user clicks on the field, "ask" will come up, pre-populated with the email from the field (for easier editing). If the user hits cancel, I want nothing to change, but if the user deletes the email and hits OK with an empty field, I want the field to be cleared.
The problem is that "it" appears to never be "cancel" with an ask dialogue, so the user hitting cancel and the user clearing the field both trigger "if it is empty".
Suggestions?