[Kss-devel] Form submittal by pressing Enter key

Godefroid Chapelle gotcha at bubblenet.be
Thu Nov 8 09:52:21 CET 2007


Hedley Roos wrote:
> I'll elaborate :)
> 
> Page Template:
> 
> <form action="http://somewhere_in_plone_site"
>        method="post"
>        id="my_form">
>    <input name="foo" type="text"/>
>    <input name="submit" type="submit"/>
> </form>
> 
> kss rule:
> 
> form#my_form:submit {
>      action-server: kss_some_script;
>      kss_some_script-kssSubmitForm: currentForm();
> }
> 
> When I click on the submit button kss_some_script is called as expected, 
> but if I just press the Enter key then it is not (the form just gets 
> submitted the normal non-ajax way).
> 
> Maybe I should just detect keypresses on the entire form?

Right, you should use keypresses... Look at Plone 3 code for inline edit.


-- 
Godefroid Chapelle (aka __gotcha) http://bubblenet.be


More information about the Kss-devel mailing list