• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: Auto Submit a form

Auto Submit a form 10 years 11 months ago #27575

  • alan09
  • alan09's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 6
Hi
How can I make a form auto submit after 10 seconds.

Regards
Alan
The administrator has disabled public write access.

Auto Submit a form 10 years 11 months ago #27578

  • cosmin.cristea
  • cosmin.cristea's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 756
  • Thank you received: 144
Insert the following code in the CSS and Javascript tab.
<script type="text/javascript">
	setTimeout("document.getElementById('userForm').submit()", 10000);
</script>

Keep in mind that userForm is the default id attribute of the form, if you changed it before you will have to change the script aswell. Change the auto submission timer by replacing 10000 (which is 10 seconds) to a value that suits your needs.
My help is not official customer support. To receive your support, submit a ticket by clicking here
Last Edit: 10 years 11 months ago by cosmin.cristea.
The administrator has disabled public write access.

Auto Submit a form 10 years 11 months ago #27581

  • alan09
  • alan09's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 6
Thank you
The administrator has disabled public write access.

Auto Submit a form 10 years 11 months ago #27679

  • kefford
  • kefford's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 8
I was reviewing forum posts and came across this one that inspired me to ask a follow-up question. The java script code is to trigger an auto submit after a time delay. Good.

How would this be done in PHP? I have written code to capture an invalid entry after a submit then change the entry to what it should be. This works great and would like to also re-submit the form for the user, all in one pass. Any ideas?

In case you wonder why this is not done in a validation rule, it is because it is too complicated to capture all possible cases. The example is he enters a country like "Britain" but he needs to enter as "UK", but not only Britain, also "Great Britain", "Wales", "Scotland" and "United Kingdom".
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!