The (WACancelButtonTag) cancel button in a form with required fields (html 5) still requires the fields to be filled out when canceling hehe. Is this normal?
RS _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Robert Sirois <watchlala <at> hotmail.com> writes:
> > > The (WACancelButtonTag) cancel button in a form with required fields (html 5) still requires the fields to be filled out when canceling hehe. Is this normal? > RS > > _______________________________________________ > seaside mailing list > seaside <at> lists.squeakfoundation.org > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > To my understanding (and I am a newbie): 1. All callbacks are valued before rendering components 2. Callback processing is not done if a high priority callback cancels further processing via `self handleAnswer: false`. 3. Callback processing is also cancelled by #respond processing. The WACancelButtonTag is set to high priority (-5). In my opinion you can cancel further processing of callbacks (and validation) by setting `self handleAnswer: false.`. Watch out if you also have AJAX as to my understanding also has priority -5. _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Well, that's not really relevant. If you have a required field (html 5) you'd think that cancelling would still work.
RS > To: seaside@lists.squeakfoundation.org > From: intrader.intrader@gmail.com > Date: Tue, 19 Jul 2011 21:55:55 +0000 > Subject: [Seaside] Re: Cancel Button > > Robert Sirois <watchlala <at> hotmail.com> writes: > > > > > > > The (WACancelButtonTag) cancel button in a form with required fields (html 5) > still requires the fields to be filled out when canceling hehe. Is this normal? > > RS > > > > _______________________________________________ > > seaside mailing list > > seaside <at> lists.squeakfoundation.org > > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > > To my understanding (and I am a newbie): > 1. All callbacks are valued before rendering components > 2. Callback processing is not done if a high priority callback cancels further > processing via `self handleAnswer: false`. > 3. Callback processing is also cancelled by #respond processing. > The WACancelButtonTag is set to high priority (-5). In my opinion you can cancel > further processing of callbacks (and validation) by setting > `self handleAnswer: false.`. > Watch out if you also have AJAX as to my understanding also has priority -5. > > > > _______________________________________________ > seaside mailing list > seaside@lists.squeakfoundation.org > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by Robert Sirois
2011/7/9 Robert Sirois <[hidden email]>:
> The (WACancelButtonTag) cancel button in a form with required fields (html > 5) still requires the fields to be filled out when canceling hehe. Is this > normal? You mean the browser still validates them? Well it's kinda expected. There is no cancel button in HTML so we just use a normal one and do callback trickery. Unfortunately the browser doesn't know about this. A possible fix might to to set the novalidate property on the form when the button is pressed. Cheers Philippe _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Oh I see. I shall try that after vacation ;)
Thanks RS > Date: Wed, 20 Jul 2011 19:10:50 +0200 > Subject: Re: [Seaside] Cancel Button > From: philippe.marschall@gmail.com > To: seaside@lists.squeakfoundation.org > > 2011/7/9 Robert Sirois <watchlala@hotmail.com>: > > The (WACancelButtonTag) cancel button in a form with required fields (html > > 5) still requires the fields to be filled out when canceling hehe. Is this > > normal? > > You mean the browser still validates them? Well it's kinda expected. > There is no cancel button in HTML so we just use a normal one and do > callback trickery. Unfortunately the browser doesn't know about this. > A possible fix might to to set the novalidate property on the form > when the button is pressed. > > Cheers > Philippe > _______________________________________________ > seaside mailing list > seaside@lists.squeakfoundation.org > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by Philippe Marschall
Hi,
>You mean the browser still validates them? Well it's kinda expected. >There is no cancel button in HTML so we just use a normal one and do >callback trickery. Unfortunately the browser doesn't know about this. >A possible fix might to to set the novalidate property on the form >when the button is pressed. >Cheers >Philippe Could one add some onClick javascript on a "cancel" button to set everything to disabled? I have a large textArea that I set to readonly because I don't want it changed but I want the user to be able to copy (and then paste) from it. I then use javascript to disable it on a submit (or cancel) so the browser won't send it back to the server, to save the upload time. Lou ----------------------------------------------------------- Louis LaBrunda Keystone Software Corp. SkypeMe callto://PhotonDemon mailto:[hidden email] http://www.Keystone-Software.com _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by Robert Sirois
Robert Sirois <watchlala <at> hotmail.com> writes:
> > Well, that's not really relevant. If you have a required field (html 5) you'd think that cancelling would still work.RS> To: seaside <at> lists.squeakfoundation.org> I am puzzled at your 'not relevant' posting. In my opinion, when you cancel, the fields should not be deemed required. _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
2011/7/25 Fritz Schenk <[hidden email]>:
> Robert Sirois <watchlala <at> hotmail.com> writes: > >> >> Well, that's not really relevant. If you have a required field (html 5) > you'd think that cancelling would still work.RS> To: seaside <at> > lists.squeakfoundation.org> > > I am puzzled at your 'not relevant' posting. In my opinion, when you cancel, the > fields should not be deemed required. There is no cancel button in HTML5, only in Seaside. The browser doesn't know it's a cancel button. Therefore you have to write some JavaScript that either removes the required property from the input fields or adds the novalidate property to the form. Cheers Philippe _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
On Mon, Jul 25, 2011 at 6:49 AM, Philippe Marschall
<[hidden email]> wrote: > 2011/7/25 Fritz Schenk <[hidden email]>: >> Robert Sirois <watchlala <at> hotmail.com> writes: >> >>> >>> Well, that's not really relevant. If you have a required field (html 5) >> you'd think that cancelling would still work.RS> To: seaside <at> >> lists.squeakfoundation.org> >> >> I am puzzled at your 'not relevant' posting. In my opinion, when you cancel, the >> fields should not be deemed required. > > There is no cancel button in HTML5, only in Seaside. The browser > doesn't know it's a cancel button. Therefore you have to write some > JavaScript that either removes the required property from the input > fields or adds the novalidate property to the form. Right. Or use a link styled to look like your buttons instead of a button. Julian _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by Intrader Intrader
Sorry Fritz, I appreciate the info. My intent was to steer the conversation a little different way. Philippe's response provided the solution I was looking for:
Therefore you have to write some Thanks, RS > To: [hidden email] > From: [hidden email] > Date: Sun, 24 Jul 2011 22:51:20 +0000 > Subject: [Seaside] Re: Cancel Button > > Robert Sirois <watchlala <at> hotmail.com> writes: > > > > > Well, that's not really relevant. If you have a required field (html 5) > you'd think that cancelling would still work.RS> To: seaside <at> > lists.squeakfoundation.org> > > I am puzzled at your 'not relevant' posting. In my opinion, when you cancel, the > fields should not be deemed required. > > > > _______________________________________________ > seaside mailing list > [hidden email] > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Free forum by Nabble | Edit this page |