How to save and reset form input after wrong captcha? - forms

I have a form in which people have to fill in a couple of input fields. The problem is: if someone puts in a wrong captcha-code or any other inputfield goes wrong, than they have to start over, filling the form once again. I know that it's possible to use cookies to save the input and reset it back, but I can't find any code for this problem? I have 7 input fields and 2 select fields....
I hope you can help me out.

Use Ajax for this, there are numerous code online for this.
Use Jquery.

See any of these links helps you
http://www.webdesignbeach.com/beachbar/ajax-fancy-captcha-jquery-plugin
http://demos.myjqueryplugins.com/qaptcha/
http://tympanus.net/codrops/2009/09/22/21-free-captcha-sources/

Related

tinymce 5 and n1ed - upon save to db, it also includes text "[removed][removed]"

I am using tinyMCE 5 and n1ed. I have no idea where this is coming from and have search google with zero results. When I submit my textarea to db for saving, it always includes "[removed][removed]". I remove n1ed and it doesn't happen. I am stumped how to even debug. Any guidance very much appreciated.
Sorry, I failed to mention I was using Codeigniter3.
I turned off xxs_clean in the validation rules and it worked.
Refer to this: Codeigniter: Submit textarea with <script> inside

Visual Basic - Button on website doesnt have an ID

I'm trying to build a application which logs you into instagram. I've got it to input the username + password no problem
However, when i go to get the ID for the submit button their isnt one.. and i've been using .GetElementById. Is their anyway around this?
I'm pretty new to visual basic so please dumb it down to simpleton terms!
Thank you in advance!
Getting elements by ID is not the only solution. You can always get them by it's names or you can find the element by yourself. Just look at the whole page's source code, search for something spesific that button carries and invoke it. Visual basic's library can be insufficient for situations like that.
WebBrowser1.Document.GetElementById("username").InvokeMember("select")
WebBrowser1.Document.ActiveElement.Focus()
SendKeys.Send("{ENTER}")
This is the code that works! Change the "username" ID to the form you will be changing, then it focuses onto it and presses enter! Simulating the submit button.

Form value store in two place

i want to store single from data in two places i.e http://www.abc.com/post.php and http://www.xyz.com/post.php. how can i do this. please help.
Thanks
Your best bet is to use jQuery to post the form. On a button click, use jQuery.post to submit the form twice.
Erick

selecting the right element using jquery

Starting from the solution provided by the Nick Caver I wish to save some inputs provided by the users into a db. The problem is that I don't know how to select the right input from the current dialog box, using jQuery.
Here is my working code.
I've solve it. I had to use :last selector. I think is a good solution.
What do you think? I'm new in jQuery

Form values remain after refresh

Hey guys, I've seen some other post similar to this, but nothing suggested in those post has worked for me, so I'll ask again here.
I've got a really basic form. If a user fill out the form partially, then hits refresh, the page reloads and all styles are reset, but instead of having the default text in the form input fields (ie: 'Required') the values from before the refresh are there. I know this is an odd case, that's unlikely to happen, but I'd still like to know why this is happening and how to stop it.
<form autocomplete="off">
https://developer.mozilla.org/en/How_to_Turn_Off_Form_Autocompletion
This is an extremely useful Firefox feature.
You should not try to prevent it.