The following warnings occurred: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (Linux)
|
![]() |
Conserve textarea data after captcha error - Printable Version +- Form Tools (https://forums.formtools.org) +-- Forum: Form Tools (https://forums.formtools.org/forumdisplay.php?fid=1) +--- Forum: General Discussion (https://forums.formtools.org/forumdisplay.php?fid=5) +--- Thread: Conserve textarea data after captcha error (/showthread.php?tid=3089) |
Conserve textarea data after captcha error - JonA - Jun 25th, 2014 using version 2.3 I have a very simple post form. It has a couple of input fields for name and email (no client or server-side verification), followed by a <textarea> for user questions/requests. I recently added a reCaptcha I followed carefully the documentation for this on the formtools site. The instructions include information on conserving the data for the client should they input the Captcha wrong and those instructions worked perfectly for my <input> fields. However, the examples given only work for <input> fields, not for <textarea>, for the simple reason that <textarea> fields have no "value". Following some suggestions I encountered online, I used the following to try and conserve the text in the <textarea> after an Captcha error: <textarea id="request" type="text" name="pedido" cols="70" rows="10"> <?php echo htmlspecialchars($_POST['pedido']);?> </textarea> I've run into some variations on this without the htmlspecialchars also, but so far nothing works. I always get the textarea blanked out on the Captcha error. What am I missing here? RE: Conserve textarea data after captcha error - Joe - Jun 27th, 2014 Hi Jon, Outputting the text area content as you have should work. You might want to try to bypass the API when using Captcha: http://forums.formtools.org/showthread.php?tid=2306 Cheers, Joe RE: Conserve textarea data after captcha error - JonA - Jun 27th, 2014 (Jun 27th, 2014, 2:53 PM)Joe Wrote: Hi Jon, Thanks. Unfortunately I'm totally ignorant on php and not much more informed about javascript, but I'll check out your link and try to get my head around it. - Jon RE: Conserve textarea data after captcha error - AlexanderBur - Jan 26th, 2020 There is an option of tools available in every forum so that we can make changes that are necessary in the forums. Bring about this thesis rush reviews you can do painting, changing the color and font of the forums. RE: Conserve textarea data after captcha error - maxanderson - Dec 26th, 2020 when someone entered the wrong captcha it works perfect but it deletes everything they typed, is there any easy way to make it save what they typed in multiple fields? ... now to prevent the original payday loans form from |