I suspected that it would be something really easy! Thanks for the help and the additional insight into how widgets are handled.
-Hank -----Original Message----- From: Vilya Harvey [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 19, 2005 5:07 AM To: [email protected] Subject: Re: Cocoon Forms - how to add a confirmation dialog on submit Hank Heidt wrote: >Can any of you recommend a good way or point me to an example of how to >add a confirmation dialog, i.e., "Are you sure that you want to save the >changes?" to the standard Cocoon Forms "submit" widget? > >I looked around and didn't see anything obvious - my hope is that there >is an easy way to do this... > > Try this: <ft:widget id="mySubmitWidget"> <fi:styling onclick="return confirm('Are you sure you want to save your changes?')"/> </ft:widget> Any attributes of the <fi:styling> element which aren't explicitly handled by the forms XSL are copied on to the output element for the widget. That includes all of the standard HTML event handler attributes, so you can easily attach client-side JavaScript to your widgets. Hope that helps, Vil. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
