disable multiple submissions,image verifiy prblem

ahmedk 17 Mar, 2008
Hi

I have 3 questions


1.I'm trying to disable the submit buttom after it was submitted the first time so if the user clicked submit the form he cant submit it again while it being processed .

I found a java script which do the trick but it disable the submit buttom even if the user didnt fill the form cause the validation will stop him from sending it he will have to reload the page

so if it possible in implement it in the validation script witch chronoform uses? If yes where should it be cause I'm not a java-script coder

the code is

<input type="submit" onclick="this.disabled=true;">


--------------
2.another thing after you submit the form the url

/site/index.php?option=com_chronocontact&task=send&chronoformname=formname


if this url is reloaded it will email the form again is this issue fixed?
I use chronoform 2.3.7 & joomla 1.0.0.13
----------------
3.I have this old problem with Imageverification

you entered wrong code althought I have everything detected
and OK

is there a fix? although it working fine on my local machine
I read it is a session thing I have my sessions to a seperated folder and joomla is working fine and joomla checked the folder with green sign.


Sorry alot of questions
Thanks or reading
GreyHead 17 Mar, 2008
Hi ahmedk,

The validation code that ChronoForms uses doesn't support hiding the OnSubmit button. It could probably be hacked to do that but I haven't seen anyone do it yet.

ChronoForms does check to see if the $_POST array is empty and will not process the form if it is. This gives some protection against mis-use of the send url. I don't know if it protects against immediate resubmission though.

I'm afraid that I don't know the answer to the Imageverification problem - I thought that the sessions problem was just with Joomla 1.5.

Bob
ahmedk 17 Mar, 2008
Thanks For your answer

another questions is it possible to disable the form as I dont want any one to send it until I publish it. cause I will enable it on specific times?


is there a hack I can do to enable it?


thanks
GreyHead 17 Mar, 2008
Hi ahmedk,

There is no publish/unpublish in ChronoForms at the moment.

But you can put an if statement at the start of the form HTML like:
<?php
form_on = false:
if ( form_on ) {
?>
  . . . form code . . .
<?php
} else {
  echo "Sorry, this form is off-line.";
}
?>
Bob

PS I did write some client code recently that turned a form on and off depending on the time of day, day of the week and bank holidays.
ahmedk 27 Mar, 2008
Hi again

I just wanna say I fixed the image verification error

I edit my php.ini and chganged the sessions save directory

and its now working.

thanks🙂
This topic is locked and no more replies can be posted.