Form values remain after refresh - forms

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.

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

Top section of page is not visible while hints are off

I am very new to magento and have developed theme.
When I try to use my theme I am unable to see header.phtml, head.phtml etc in my page.
In page source I am seeing all stuff but thats not visible on page.
When hints are on I am seeing all stuff correctly with hints.
Please help me out.
This is my URL..
http://216.12.194.46/~kartscom/kartsftp/magento/index.php/computer/sony.html
Regards,
Suraj.
It appears that your header-container (and possibly header) does not close itself correctly.
I suggest checking the file /app/design/frontend/my_company/default/template/page/html/header.phtml to make sure each div closes itself.
By enabling hints, the hint boxes (which are made by div tags) end up closing the containers, which is why it shows correctly with it on, except for the fact that the box labeled as "frontend/my_company/default/template/page/html/header.phtml" (Mage_Page_Block_Html_Header) in your hints extends all the way down the page.
The "header-container" div needs to close before the "main-container col2-right-layout" div. To help deduce any other errors, I suggest starting off by turning hints off and running your page through the W3C Html Validator, and trying to correct as many issues as possible.
The validator tool will definitely help in tracking down any tags that aren't being closed, plus I always strive to have pages that pass with 0 errors / 0 warnings.

Chrome: Fill out same form many times for testing

Is there some kind of tool (ideally for Chrome) in which I can fill out a long form that I am designing/testing many times?
I should be able to:
Fill out everything once and save it
Fill in the saved form with one button click
Fill out the form differently and save it as a different "profile"
I'm testing some things manually during development so I don't want a fully automated solution for this (I am using Symfony2.1 so I can write functional tests also). I just need a way to quickly fill out the form so I can save myself some time but I haven't been able to find a good Chrome extension or anything to do it. I remember Firebug in Firefox having something like this I think (I never used it though) so I imagine something exists.
The built in saved forms don't seem to be as useful for this task but maybe I'm missing something.
You can check out iMacros for Chrome:
https://chrome.google.com/webstore/detail/imacros-for-chrome/cplklnmnlbnpmjogncfgfijoopmnlemp
Call it a rudimentary answer, but I believe the button shortcuts in Chrome accept Javascript. I've done this with FireFox by doing something like:
javascript:document.formname.fieldname.value='value';document.formname.fieldname2.value='value';document.formname.fieldname3.value='value';return false;
There are some plugins. I used the below one, and it can satisfy your requirement.
This extension allows you to fill all form inputs with dummy data.
https://chrome.google.com/webstore/detail/form-filler/bnjjngeaknajbdcgpfkgnonkmififhfo
Here this one is for storing the form data and reusing it later. plugin populates with the data saved later when you want to fill it again.
https://chrome.google.com/webstore/detail/simple-form-filler/hbgbedpagfcecmjmlfpndghfclhnmmll/details
Hope this helps
This isn't an extension, but I've always found the easiest way to test a form is with a little jQuery.
I put a link under the submit button:
fillform
Then I fill the form with jQuery.
$('#fill_form').click(function(event) {
$("#name").val("Phoney Phoneyman");
$("#phone").val("555 867-5309");
$("#email").val("phoney#baloney.com");
$("#password").val("123456");
$("#password_conf").val("123456");
});
It takes about as long to do this as it does filling out the form initially and saves a ton of time. A tiny bit more work and you could generate random values - or values from a list.
Just remember to delete it all when you're done.
Google's form filler is just always incorrect enough to create work rather than save time.
Best form fill up extension ever is JunkFill.
I love it.
There is now a Selenium extension for Chrome. Selenium is one of the most popular webdrivers, I've used this as well, and even though there are a few oddballs in there, it works well generally:
https://chrome.google.com/webstore/detail/selenium-ide/mooikfkahbdckldjjndioackbalphokd?hl=en
I have made a chrome extension which exactly matches your needs, it may be worth a try - SimpleFill.
It's really simple and is available for Chrome, Opera, and Firefox.
Another useful chrome extension Formbot. When set to randomly fill the inputs, it will fill them with valid data.
You can check the Bug Magnet Chrome extension.

How to save and reset form input after wrong captcha?

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/

Web2py Form works as expected most of the time but occasionally it simply clears

I have a few forms in a web2py shopping cart that I built from scratch. Most of the time the forms are working fine but once in awhile on submission a form will neither submit and redirect to the next page of the cart nor return any form errors as it usually does when there is a form error.
Instead it simply refreshes the page and clears the form. What's really frustrating about this bug is that the same user will have this bug and when they try again with the same browser and same data it will work fine.
In fact, none of my team has been able to reproduce it but three of our users have reported it so I'm inclined to think something is wrong.
One thing the forms all in common is that they all add session as an argument for form.accepts:
if form.accepts(request.vars, session):
Perhaps if something was screwy in my session it might cause this behavior? Although when I looked in the gluon/sqlhtml web2py file it didn't seem to use session for much of anything.
The various forms and models are all very long so before posting all of that code, I was wondering if anybody simply had some thoughts on what might be causing this and/or could point me in the right direction.
I'll be happy to post any part of the code that would help shed some light on the matter. Let me know, thanks.