Disable submit button after single click

classic Classic list List threaded Threaded
15 messages Options
Reply | Threaded
Open this post in threaded view
|

Disable submit button after single click

karthik Jayaraman
HI,

I have designed a form using form builder. And i have changed my form submission URI. I have a constraint that submit button should be clicked only once. It will take some time for my form to submit(to my application). In the mean time the submit button should not be clicked. How can i achieve this ?

Another alternative for me is to render the whole form in the read only mode. (like when we apply xxforms:modal=true).



Comments appreciated.
Reply | Threaded
Open this post in threaded view
|

Re: Disable submit button after single click

Louis Ratzesberger-2

Karthik,

If a button has a ref attribute, and the the value it
refers to is 'false', then the button will be disabled.

You can create a button on your form (not at the bottom
which is managed by Form Runner and your configuration),
and edit the code to change the reference value and then
run the submission.

AFAIK, you can't edit the workflow buttons, only specify
which buttons are available in the different forms,
(oxf.fr.detail.buttons.*).

As I understand, this kind of change requires modifying
the Form runner source code that produces the page and that
it is an xslt file (I don't know it's location.)

Sorry I can't be more help, just wanted to say what you
might be facing.

--Hank


Quoting karthik Jayaraman <[hidden email]>:

>
> HI,
>
> I have designed a form using form builder. And i have changed my form
> submission URI. I have a constraint that submit button should be clicked
> only once. It will take some time for my form to submit(to my application).
> In the mean time the submit button should not be clicked. How can i achieve
> this ?
>
>
> --
> View this message in context:  
> http://orbeon-forms-ops-users.24843.n4.nabble.com/Disable-submit-button-after-single-click-tp2252017p2252017.html
> Sent from the Orbeon Forms (ops-users) mailing list archive at Nabble.com.
>


--
Hank Ratzesberger
[hidden email]



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Disable submit button after single click

karthik Jayaraman
This post was updated on .
First of all thanks for your intention to help :)

But instead of having a new button in the form,i have no other option other than to editing the existing workflow buttons => editing the source code. So could anyone help me on that. ??


Or atleast after clicking the submit button once my entire form should change to read only mode. Is it achievable ?


Reply | Threaded
Open this post in threaded view
|

Re: Re: Disable submit button after single click

Erik Bruchez
Administrator
How are you submitting your form?

The "Save" button already displays a waiting icon that prevents the
user from clicking the button twice.

(Although there should be a better server-side mechanism to prevent a
double-submission.)

-Erik

On Sat, Jun 12, 2010 at 9:17 AM, karthik Jayaraman <[hidden email]> wrote:

>
> First of all thanks for your intention to help :)
>
> But i have no other option other than to edit the source code. So could
> anyone help me on that.
>
>
> --
> View this message in context: http://orbeon-forms-ops-users.24843.n4.nabble.com/Disable-submit-button-after-single-click-tp2252017p2252863.html
> Sent from the Orbeon Forms (ops-users) mailing list archive at Nabble.com.
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
>
>


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: Disable submit button after single click

karthik Jayaraman

 Erik Thanks for the response. Ya after clicking the submit button, a waiting icon displays for a just a second and then the form tries to redirect to the submission URL. So this gives user ample time to click the submit button twice. BTW  I am using submit button to submit my form. Do you mean that i should handle double submission via my application to which my orbeon form is submitted ?
Reply | Threaded
Open this post in threaded view
|

Re: Re: Disable submit button after single click

karthik Jayaraman
I should handle the multiple clicks of the submit button on the server side ? can yo give me more inputs on this.? I cannot get what you meant...

Awaiting for reply !!
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Disable submit button after single click

Erik Bruchez
Administrator
I thought you had an idea about how to do this in your own code, so
was encouraging you do do it ;)

But I did not have a specific idea about how you could do it. I guess
we have to think more about this on our side.

-Erik

On Thu, Jun 17, 2010 at 7:26 AM, karthik Jayaraman <[hidden email]> wrote:

>
> I should handle the multiple clicks of the submit button on the server side ?
> can yo give me more inputs on this.? I cannot get what you meant...
>
> Awaiting for reply !!
> --
> View this message in context: http://orbeon-forms-ops-users.24843.n4.nabble.com/Disable-submit-button-after-single-click-tp2252017p2258893.html
> Sent from the Orbeon Forms (ops-users) mailing list archive at Nabble.com.
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
>
>


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Disable submit button after single click

Erik Bruchez
Administrator
What version of Orbeon Forms are you using?

-Erik

On Fri, Jun 18, 2010 at 6:59 PM, Erik Bruchez <[hidden email]> wrote:

> I thought you had an idea about how to do this in your own code, so
> was encouraging you do do it ;)
>
> But I did not have a specific idea about how you could do it. I guess
> we have to think more about this on our side.
>
> -Erik
>
> On Thu, Jun 17, 2010 at 7:26 AM, karthik Jayaraman <[hidden email]> wrote:
>>
>> I should handle the multiple clicks of the submit button on the server side ?
>> can yo give me more inputs on this.? I cannot get what you meant...
>>
>> Awaiting for reply !!
>> --
>> View this message in context: http://orbeon-forms-ops-users.24843.n4.nabble.com/Disable-submit-button-after-single-click-tp2252017p2258893.html
>> Sent from the Orbeon Forms (ops-users) mailing list archive at Nabble.com.
>>
>>
>> --
>> You receive this message as a subscriber of the [hidden email] mailing list.
>> To unsubscribe: mailto:[hidden email]
>> For general help: mailto:[hidden email]?subject=help
>> OW2 mailing lists service home page: http://www.ow2.org/wws
>>
>>
>


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Disable submit button after single click

karthik Jayaraman
Orbeon 3.8.0 PE
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Re: Disable submit button after single click

Alessandro  Vernet
Administrator
Karthik,

Let me assume the following:

1. This is your own button you are using (not one of the predefined
Form Runner buttons).
2. The button is modal; you have a  xxforms:modal="true".
3. When users click the button you are doing a <submission
replace="instance"> to submit the data.
4. Then you do an xforms:load to go to another page.

The issue is that the "spinner" stays during the submission (#3) but
not while the other page is loaded (#4). If this is indeed what you
have, this bug has been fixed just a few days ago, so I would
encourage you to get a new nightly build and try again. You'll let us
know how this works for you.

Alex

On Tue, Jun 22, 2010 at 6:45 PM, karthik Jayaraman <[hidden email]> wrote:

>
> Orbeon 3.8.0
> --
> View this message in context: http://orbeon-forms-ops-users.24843.n4.nabble.com/Disable-submit-button-after-single-click-tp2252017p2265005.html
> Sent from the Orbeon Forms (ops-users) mailing list archive at Nabble.com.
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
>
>


--
Orbeon Forms - Web forms, open-source, for the Enterprise -
http://www.orbeon.com/
My Twitter: http://twitter.com/avernet


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Re: Disable submit button after single click

karthik Jayaraman
First of all thanks for the reply !

But the submit button which i am using is one of the predefined form runner button. I have edited the source such that after submission my form is redirected to a URL.(this occurs only after persistance to DB). So any suggestions ?
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Re: Disable submit button after single click

karthik Jayaraman
In reply to this post by Alessandro Vernet

First of all thanks for the reply !

But the submit button which i am using is one of the predefined form runner
button. I have edited the source such that after submission my form is
redirected to a URL.(this occurs only after persistance to DB). So any
suggestions ?
--
View this message in context: http://orbeon-forms-ops-users.24843.n4.nabble.com/Disable-submit-button-after-single-click-tp2252017p2265917.html
Sent from the Orbeon Forms (ops-users) mailing list archive at Nabble.com.


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Re: Re: Disable submit button after single click

Alessandro  Vernet
Administrator
In reply to this post by karthik Jayaraman
Karthik,

It doesn't matter if the button is part of Form Runner or not. In
either case you might be impacted by this issue of the "spinner" going
away while the target page is loaded. Could you try again with a new
nightly build to see if that solves your problem? If it doesn't, could
you create a screencast of what you see with a tool like Jing, so we
can see more precisely what is happening?

Alex

On Wed, Jun 23, 2010 at 10:19 AM, karthik Jayaraman <[hidden email]> wrote:

>
> First of all thanks for the reply !
>
> But the submit button which i am using is one of the predefined form runner
> button. I have edited the source such that after submission my form is
> redirected to a URL.(this occurs only after persistance to DB). So any
> suggestions ?
> --
> View this message in context: http://orbeon-forms-ops-users.24843.n4.nabble.com/Disable-submit-button-after-single-click-tp2252017p2265916.html
> Sent from the Orbeon Forms (ops-users) mailing list archive at Nabble.com.
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
>
>


--
Orbeon Forms - Web forms, open-source, for the Enterprise -
http://www.orbeon.com/
My Twitter: http://twitter.com/avernet


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Re: Re: Disable submit button after single click

karthik Jayaraman
Wow ! You guyz are amazing. ! Tried the nightly build and i was surprised ! I really appreciate your work !
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Re: Re: Re: Disable submit button after single click

Alessandro  Vernet
Administrator
Karthik,

Excellent, I am glad it was indeed that same issue we fixed last week
you encountered!

Alex

On Fri, Jun 25, 2010 at 5:45 AM, karthik Jayaraman <[hidden email]> wrote:

>
> Wow ! You guyz are amazing. ! Tried the nightly build and i was surprised ! I
> really appreciate your work !
> --
> View this message in context: http://orbeon-forms-ops-users.24843.n4.nabble.com/Disable-submit-button-after-single-click-tp2252017p2268399.html
> Sent from the Orbeon Forms (ops-users) mailing list archive at Nabble.com.
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
>
>


--
Orbeon Forms - Web forms, open-source, for the Enterprise -
http://www.orbeon.com/
My Twitter: http://twitter.com/avernet


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet