The following warnings occurred:
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (Linux)
File Line Function
/global.php 783 errorHandler->error
/showthread.php 26 require_once
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (Linux)
File Line Function
/global.php 783 errorHandler->error
/showthread.php 26 require_once
Warning [2] Undefined variable $newpmmsg - Line: 40 - File: global.php(841) : eval()'d code PHP 8.1.31 (Linux)
File Line Function
/global.php(841) : eval()'d code 40 errorHandler->error
/global.php 841 eval
/showthread.php 26 require_once
Warning [2] Undefined array key "style" - Line: 909 - File: global.php PHP 8.1.31 (Linux)
File Line Function
/global.php 909 errorHandler->error
/showthread.php 26 require_once
Warning [2] Undefined property: MyLanguage::$lang_select_default - Line: 5024 - File: inc/functions.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions.php 5024 errorHandler->error
/global.php 909 build_theme_select
/showthread.php 26 require_once
Warning [2] Undefined array key "additionalgroups" - Line: 7162 - File: inc/functions.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions.php 7162 errorHandler->error
/inc/functions.php 5044 is_member
/global.php 909 build_theme_select
/showthread.php 26 require_once
Warning [2] Undefined array key 1 - Line: 1415 - File: inc/functions.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions.php 1415 errorHandler->error
/inc/functions.php 1370 fetch_forum_permissions
/showthread.php 137 forum_permissions
Warning [2] Undefined array key 1 - Line: 1415 - File: inc/functions.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions.php 1415 errorHandler->error
/inc/functions.php 1380 fetch_forum_permissions
/inc/functions.php 2909 forum_permissions
/showthread.php 621 build_forum_jump
Warning [2] Undefined array key 1 - Line: 1415 - File: inc/functions.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions.php 1415 errorHandler->error
/inc/functions.php 1380 fetch_forum_permissions
/inc/functions.php 2909 forum_permissions
/showthread.php 621 build_forum_jump
Warning [2] Undefined array key 1 - Line: 1415 - File: inc/functions.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions.php 1415 errorHandler->error
/inc/functions.php 1380 fetch_forum_permissions
/inc/functions.php 2909 forum_permissions
/showthread.php 621 build_forum_jump
Warning [2] Undefined array key 1 - Line: 1415 - File: inc/functions.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions.php 1415 errorHandler->error
/inc/functions.php 1380 fetch_forum_permissions
/inc/functions.php 2909 forum_permissions
/showthread.php 621 build_forum_jump
Warning [2] Undefined array key 1 - Line: 1415 - File: inc/functions.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions.php 1415 errorHandler->error
/inc/functions.php 1380 fetch_forum_permissions
/inc/functions.php 2909 forum_permissions
/showthread.php 621 build_forum_jump
Warning [2] Undefined array key 1 - Line: 1415 - File: inc/functions.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions.php 1415 errorHandler->error
/inc/functions.php 1380 fetch_forum_permissions
/inc/functions.php 2909 forum_permissions
/showthread.php 621 build_forum_jump
Warning [2] Undefined property: MyLanguage::$ratings_update_error - Line: 5 - File: showthread.php(732) : eval()'d code PHP 8.1.31 (Linux)
File Line Function
/showthread.php(732) : eval()'d code 5 errorHandler->error
/showthread.php 732 eval
Warning [2] Undefined array key "additionalgroups" - Line: 7162 - File: inc/functions.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions.php 7162 errorHandler->error
/inc/functions_user.php 844 is_member
/inc/functions_post.php 406 purgespammer_show
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "profilefield" - Line: 6 - File: inc/functions_post.php(474) : eval()'d code PHP 8.1.31 (Linux)
File Line Function
/inc/functions_post.php(474) : eval()'d code 6 errorHandler->error
/inc/functions_post.php 474 eval
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "canonlyreplyownthreads" - Line: 660 - File: inc/functions_post.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions_post.php 660 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "showimages" - Line: 741 - File: inc/functions_post.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions_post.php 741 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "showvideos" - Line: 746 - File: inc/functions_post.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions_post.php 746 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "additionalgroups" - Line: 7162 - File: inc/functions.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions.php 7162 errorHandler->error
/inc/functions_user.php 844 is_member
/inc/functions_post.php 406 purgespammer_show
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "profilefield" - Line: 6 - File: inc/functions_post.php(474) : eval()'d code PHP 8.1.31 (Linux)
File Line Function
/inc/functions_post.php(474) : eval()'d code 6 errorHandler->error
/inc/functions_post.php 474 eval
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "canonlyreplyownthreads" - Line: 660 - File: inc/functions_post.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions_post.php 660 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "showimages" - Line: 741 - File: inc/functions_post.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions_post.php 741 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "showvideos" - Line: 746 - File: inc/functions_post.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions_post.php 746 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "additionalgroups" - Line: 7162 - File: inc/functions.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions.php 7162 errorHandler->error
/inc/functions_user.php 844 is_member
/inc/functions_post.php 406 purgespammer_show
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "profilefield" - Line: 6 - File: inc/functions_post.php(474) : eval()'d code PHP 8.1.31 (Linux)
File Line Function
/inc/functions_post.php(474) : eval()'d code 6 errorHandler->error
/inc/functions_post.php 474 eval
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "canonlyreplyownthreads" - Line: 660 - File: inc/functions_post.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions_post.php 660 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "showimages" - Line: 741 - File: inc/functions_post.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions_post.php 741 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "showvideos" - Line: 746 - File: inc/functions_post.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions_post.php 746 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "invisible" - Line: 1506 - File: showthread.php PHP 8.1.31 (Linux)
File Line Function
/showthread.php 1506 errorHandler->error
Warning [2] Undefined variable $threadnotesbox - Line: 30 - File: showthread.php(1533) : eval()'d code PHP 8.1.31 (Linux)
File Line Function
/showthread.php(1533) : eval()'d code 30 errorHandler->error
/showthread.php 1533 eval
Warning [2] Undefined variable $addremovesubscription - Line: 79 - File: showthread.php(1533) : eval()'d code PHP 8.1.31 (Linux)
File Line Function
/showthread.php(1533) : eval()'d code 79 errorHandler->error
/showthread.php 1533 eval



FORUMS


The Form Tools forums are no longer active, but the old posts have been archived here. Please see the Help page on how to get help / report issues.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problems repopulating text fields after failed CAPTCHA submission
#1

In Detail:
I am having trouble re-populating my friends in a one page form after the user incorrectly enters the Captcha. It is located http://certus.worldpath.net/contactRePop.php#Email. Right now, I have a warning that the fields will not save their information and to type their message outside of the form, but I don’t think that is particularly user-friendly. This is not currently a “live” site, but I would like to solve this issue before it becomes so.

I’ve built a few forms using CAPTCHAs by following the tutorial “Adding CAPTCHAs to your POST form”. They work, but I have not successfully implemented “step 3. Re-entering fields”. For some reason, the php code located within the quotes for the “value”, print as the text on the form. (I’ve seen forms on other websites do this, clearly experiencing the same thing as I am, but don’t know how to fix it)

I have a couple of theories, but due to my lack of experience with php, am unsure if they are realistic.

1. My form fields are within div tags. The example uses br tags to move things along, but I wanted greater control over the “look” of my form. I imagine this could cause an issue.

2. I am using “id” and “class” instead of “name” to define my divs. I’ve not really encountered “name” before and will be looking into it further while I await the brilliance that exists on this forum to comment on my post. I did try to drop the formatting of the form and use “name” but it didn’t seem to help.

3. Short tags vs long? I did try switching between both, but with no impact.

4. Perhaps my server side form validation is messing with things?

I spent Friday combing through the forums trying to find someone describe a similar issue, but did not find it. Perhaps I don’t know the correct terms to search, and would welcome being pointed to that post. Some of them seemed similar, but not quite applicable. For instance, “Re-filling form fields using the API”, seems applicable, but I am using the “POST” form and so “step 3. Reentering fields” should work, but it is not. My form is only a page long, and so going the more complicated method using “Adding a single page form with the API” seemed like overkill.

I’d rather not re-build the form, but if someone on these forums can’t help me, that will be my next step.
Unfortunately, a second issue makes investigating this problem a little annoying. When the CAPTCHA is entered incorrectly, and the form submitted, the page currently redirects to contactRePop.php and not contactRePop.php#Email, so the user (and you wonderful people helping me) may not be aware the form was entered incorrectly unless they click on the “Email Us” tab, again. I presume that somewhere within the code, I need to direct a failed CAPTCHA to the hash tag instead of the main address, but I have been unable to find where I do that.

Since the form is functional and does send me e-mails, if you decide to test it please put somewhere in the message that you are helping me with my issues. If you can tell me what fields, if any, should be censored, I would be grateful. If you include a real email address, I will forward the message as soon as I get it, in case it aids in your diagnosis.

I can post the messages received from the forms, if you would like, but don’t know if there is any information in the Test tab version that should not be public. If someone can tell me what fields, if any, should be censored, I will post one of my tests. Since the problem is only with failed submissions, I doubt this will help, however.


In Summary:

1. http://certus.worldpath.net/contactRePop.php#Email is printing the php script in “step 3. Re-entering fields” in my form fields and not re-populating when a CAPTCHA is incorrectly entered and submitted.

2. I can’t find where to change where the user goes upon an incorrect submission. Currently it sends to the “general” page of contactRePop.php as opposed to contactRePop.php#Email.

3. Is it “safe” for me to post the information from the Test versions of these emails for everyone to see or is there some information I should censor?


I’ve successfully solved my other bumps and problems through already posted questions and answers. This forum has been fabulous. I hope you all will be able to assist me, as well. I apologize for the length. I hope I’ve given enough information.
Reply
#2
Update:
Well, after 24 hours of no response, I rebuilt the form using the API. You can find my rebuild at http://certus.worldpath.net/jobformRE.php. I took it out of the tabs and changed the doc type and a few other things. The form functions in every way but the repopulating of fields. I don't know if this is a positive thing or not, but I've managed to make the php code that was printing in the text field disappear. I've got some JS validation and the Captcha works, in that it is preventing the delivery of incorrect Captcha entries, but when it fails, the fields still don't repopulate. Within the CAPTCHA an error message displays. I've tried all of the combinations of code I can conjure.

value="<?php htmlspecialchars(@$fields["element_1"])?>"/> failed to repopulate
value="<?php htmlspecialchars($fields["element_1"])?>"/> failed to repopulate
value="<?php @$fields["element_1"]?>"/> failed to repopulate
value="<?php $fields["element_1"]?>"/> failed to repopulate

What am I doing wrong?
Reply
#3
I'm having the same problems with form fields not repopulating when using the API. My server side validation works and will return an error if a required field is left blank. The CAPTCHA will show and error if an incorrect word is entered, but all the form fields return blank. If anyone knows how to correct this, I'd appreciate the help.

Julie

(Jan 24th, 2013, 8:59 AM)acannan Wrote: Update:
Well, after 24 hours of no response, I rebuilt the form using the API. You can find my rebuild at http://certus.worldpath.net/jobformRE.php. I took it out of the tabs and changed the doc type and a few other things. The form functions in every way but the repopulating of fields. I don't know if this is a positive thing or not, but I've managed to make the php code that was printing in the text field disappear. I've got some JS validation and the Captcha works, in that it is preventing the delivery of incorrect Captcha entries, but when it fails, the fields still don't repopulate. Within the CAPTCHA an error message displays. I've tried all of the combinations of code I can conjure.

value="<?php htmlspecialchars(@$fields["element_1"])?>"/> failed to repopulate
value="<?php htmlspecialchars($fields["element_1"])?>"/> failed to repopulate
value="<?php @$fields["element_1"]?>"/> failed to repopulate
value="<?php $fields["element_1"]?>"/> failed to repopulate

What am I doing wrong?

Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)