why is my captcha not working?
hi guys, thought i'd followed the instructions to the letter but the form uploads even if nothing in captcha box. it is set to "like entry".....any idea what im doing wrong? file is teacher-registration.php
hi guys, thought i'd followed the instructions to the letter but the form uploads even if nothing in captcha box. it is set to "like entry".....any idea what im doing wrong? file is teacher-registration.php
The form action is set to: teachers_register_complete.php
That is the page that would need captcha validation and is processing the file upload. The server validation on this page never runs since the form is submitted to another page.
This post has been deleted.
so i set up the same validation etc but on the form receiving page yep?
Just looking at it now - if I try to do that it doesnt make sense to me that I can set the server variable as$_SESSION['captcha_Security_Code_1'], but a) does the trigger need to be "before page load", as I'm not submitting a form on the receiving page (teacher_registration_complete.php), and I seem to have nothing to compare the variable to as the form field isnt on this page, its on the previoous page.
How do I complete the process - I just want that the initial page form doesnt send if the captcha is incorrect....and the user is requested to try again? like usually happends on web pages?? do i need ot restructure the workflow completely here? the idea is they complete the form and submit, an email is triggered with content, to the client, with attached CV file (plus i will want to add inserting the record into a database table. but i want for that NOT to happpen is the captcha is invalid...?
thanks for your help as ever Ray
So I guess I have to put the captcha on the recieiving page too, rather than the initial page? but the form is going to send anyway on loading so it wouldnt work. i'm confused! there must be a simpler way to
Change the form action to teacher-registration.php and then you can do everything on that page and just redirect to the teacher_registration_complete.php page when you apply the email server behavior on the page by setting the success redirect.
You could also simply copy and paste the code you already have on the top of the teacher_registration_complete.php page and do the validation and processing on that page. The only line you would have to update would be line 6 to:
$WAFV_Redirect = "teacher_registration.php";
The form from the other page won't show up in the bindings by default, but you can go to the bindings tab on the complete page and click the plus button and choose "Form Data" and put in the teacher_registration page to have it's form elements display as available.
You don't need to upload the file at all. The email server behavior has an option to add it as an attachment and send it from a file field without ever storing it on your server. You can also apply the email on the same page as the file upload and/or server validation. The server validation will prevent it from sending .
Form element values are only available on the page set as the action page of the form. That is where they are submitted to. The server validation, file upload, and email server behaviors should be applied on the same page (the form action page). That can either be the same page as the form is on, or another page as long as it is the page specified as the action. If you do use the same page, then you can use the go to page setting in the email to go to the next page after the email is sent.
Hi Ray,
Further to above, have added the email behaviour to the teacher-registration page successfully. Added the file attachment fine and removed the unneeded file upload behaviour. EMails triggering fine, but I cannot, for the love of god, get this captcha to work. It just seems to let the form send whatever. Have tried to follow your guide, and form action is pointing at teacher-registration.php but it wont validate. Also, I added a quick "incorrect" SHOW IF FAILS behaviour and that shows on the page regardless.
Pleeeease! Where am I going wrong. So need to put this to bed :)
Everything appears to be applied correctly. If you can give me a url for testing and FTP access I can debug it and let you know what the problem was.
It appears the CAPTCHA is working... you just don't have a success redirect, so it is hard to tell the difference... however I'm pretty sure the registration email isn't sent unless the CAPTCHA is correct.
I think the changes you need to make to allow this to work more smoothly is to add a success or failure message to the very top of the form and add validated form bindings to the existing fields so they maintain their values when the CAPTCHA fails.
I've gone ahead and made those changes for you... Please download the updated file I've made the additions to.
THanks - where do i find the updated file download??
Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.
These out-of-the-box solutions provide you proven, tested applications that can be up and running now. Build a store, a gallery, or a web-based email solution.