Google suggestion above algolia autocomplete - algolia

i've try to use Algolia today for my website, work perfectitly but the google suggestion always show in front of the input before the results of Algolia.
So if you have any idea (I already try do desactivate this but without any results )
Thanks

In order to deactivate the chrome suggestion dropdown, you should add autocomplete="off" to your search input
<input type="text" autocomplete="off" />
https://developer.mozilla.org/en-US/docs/Web/Security/Securing_your_site/Turning_off_form_autocompletion

Related

How to scrape a form that requires field validation by user?

I'm trying to scrape prices from this site:
https://www.pensketruckrental.com/quote/start.html
I can easily enter the form data, and I can activate the "Get A Quote" button and click it.
What I can't seem to do is get the form data to submit using a web scraper (I'm just doing it in VBA). When I input text using the scraper, the button remains grayed out, and even making a .click call on the button just displays errors on the form telling you not to leave the fields blank. Apparently it only recognizes data when you use an input device?
The code for one of the required fields, pickupLocation, is the following when I enter it manually (and thus the button works and the form can be submitted):
<input
type="text"
id="pickUpLocation"
name="pickUpLocation"
class="penskeValidateField penskeGoogleTypeAhead penskeInlineError ng-isolate-scope ng-touched ng-focused ng-dirty ng-valid-penske-err_loc_empty_sa ng-valid ng-valid-parse ng-valid-required"
aria-invalid="false"
aria-required="false"
country="rentalEntryCtrl.formItems.country"
penske-validate-field="pickuplocation"
required=""
autocompelete="off"
data-penske-placeholder="rentalEntryCtrl.activePlaceHolders.pickUpLocation"
ng-model="rentalEntryCtrl.formItems.pickupLocationSearchCriteria.address"
autocomplete="off">
And when I enter the data automatically using my scraper the tag & attributes read as follows:
<input
type="text"
id="pickUpLocation"
name="pickUpLocation"
class="penskeValidateField penskeGoogleTypeAhead penskeInlineError ng-pristine ng-isolate-scope ng-invalid ng-invalid-required placeholder ng-touched"
aria-invalid="true"
aria-required="true"
country="rentalEntryCtrl.formItems.country"
penske-validate-field="pickuplocation"
required=""
autocomplete="off"
data-penske-placeholder="rentalEntryCtrl.activePlaceHolders.pickUpLocation"
ng-model="rentalEntryCtrl.formItems.pickupLocationSearchCriteria.address"
autocompelete="off">
So of course I tried to copy the fields in the first code block into the second code block using setAttribute(), but even though I could change the attributes, I still couldn't get the form to submit properly.
I've looked at others that have dealt with something somewhat similar with autocorrect; their solutions have involved looking at the header and responses and just using the straight XHR to loop through the autocomplete queries, but the pricing information I'm scraping comes after several pages of form submissions, so that's not an option here.
I'm stuck I think; any ideas on how to populate the form and click the button/submit via my scraper?

Disable Chrome Autofill creditcard

I have two fields in my form which Chrome falsely identified as credit card numbers (one is for a phone number and one is for a fax number). There are also two fields for firstnames which Chrome thinks are fields for credit card names and want to autofill. Is there some attribute I can use on these elements to tell Chrome that they are in fact not related to a credit card?
I've tried setting autocomplete="false" on the inputs. This removed the autofill options for address/contact information, but the credit card option was still there.
I finally found a workaround! Set the autocomplete attribute as "cc-csc". That value is the CSC of a credit card and they are no allowed to store it! (for now...)
autocomplete="cc-csc"
Have you tried:
autocomplete="nope"
At first glance this may look silly but ...
In some cases, the browser will keep suggesting autocompletion values
even if the autocomplete attribute is set to off. This unexpected
behavior can be quite puzzling for developers. The trick to really
forcing the no-autocompletion is to assign a random string to the
attribute --- https://developer.mozilla.org/en-US/docs/Web/Security/Securing_your_site/Turning_off_form_autocompletion
I had the same issue and solved the problem by changing:
<input type="text" ...>
To
<input type="email" ...>
This will add the "#" on the user keyboard, but no problem.
Or
<input type="search" ...>
This will change the "confirm button" on the user keyboard to the "search button". It is less intuitive than the previous solution.
Chrome requires at least one input with autocomplete="on" attribute to use 'off' with others. So you can do a trick:
<input autocomplete="on" style="opacity: 0; position: absolute; pointer-events: none">
<input autocomplete="off" type="text">
...
I had the same issue and ended up going with this:
<input
type="search"
enterkeyhint="go"
/>
type="search" was the only one that seemed to work for me (taken from José's answer).
enterkeyhint="go" removes the search or magnifying glass from the "enter" button on virtual keyboards.

Knockout.js Textbox Value Binding Auto-Complete

I have a text input field bound to a viewmodel using a Knockout.js value binding. In IE9 if I type in the first few letters of my username, I get the standard auto-complete dropdown. Selecting my username from the auto-complete does not update my viewmodel. Is there a way to trigger an update to my observable from an auto-complete selection?
<input type="text" data-bind="value: userName" />
Upgrading to 2.1.0 as suggested by Richard's answer fixed my problem, so I have marked it as the answer.
For anyone needing this to work in Knockout 2.0.0, setting valueUpdate to 'blur' seems to work as well.
<input type="text" data-bind="value: userName, valueUpdate: 'blur'" />
This issue was submitted as a bug 1 year ago:
https://github.com/SteveSanderson/knockout/pull/122
It seems a fix been included in the 2.1.0 version of knockout.js - so if you update it should fix this issue for you.
If this is not possible, an alternative suggestion is to just turn autocomplete off on your username <input> using the attribute autocomplete="off"
It is working for me valueUpdate: 'blur' with ko_autocomplete in knockout

Browser won't prompt to save password

This is quite a common question but the solutions I found in other people posts are either related to a specific browser (mostly firefox) or incorrect usage of names (name="U12-678132-34")
My issues are with browsers other then Firefox (Firefox all ways works).
The form that I use is pretty standard HTML form but the submission of it is done with javascript (jQuery AJAX).
Firefox all ways asks to remember the password (if it is a new user) and refills the form if you land on that same page again. But when it comes to Chrome/Safari/IE8-9 then they never request to save a password if the form is submitted with javascript.
(By the way I did check if the browsers dont have the - never remember passwords turned on)
My submit happens when you click on the link inside the form or if you just click the "ENTER" button on your keyboard, then it initiates the $.submit() method.
Is there a specific way that the submit needs to occur so that the browser would request to save a password like firefox does? or is there a way to at least tell a specific browser like Chrome/IE to force that type of request?
Form example:
<form class="loginform" method="post" action="">
<div class="inputfield">
<input name="email" type="text" class="emailaddress inputclass" value="" title="Email Address" />
</div>
<div class="inputfield">
<input name="password" type="password" class="password inputclass" title="Password" value="" />
</div>
<div class="submit">
<div class="checking">
<img src="/preloaders/login-preloader.png"/>
</div>
<input type="submit" name="submit" value="submit" style="display:none"/>
</div>
</form>
This is browser behaviour and can't really be changed. Firefox might be "smart" enough to offer to save passwords without the form actually being submitted, but that risks having buttons in the form also trigger that option even if the button does something different. So in my opinion, it's a bad thing for Firefox to do (I've had many problems with Firefox submitting forms even though it shouldn't).
If you really want the save password option to show up, use an iframe and submit to the iframe, instead of using AJAX. You could then use AJAX from the iframe to keep the old behaviour.
attach click event to your submit button
$('#id_of_submit').click(function() {
/your ajax logic
return false;
});
and on link
$('#id_of_your_link').click(function() {
$('#id_of_submit').click();
});
this will do the trick.
Looking at the answer accepted on here - How can I get browser to prompt to save password? - it seems that a valid action might help.
But i would suggest its down to browser behaviour and cannot be controlled by HTML and/or JavaScript. If you want to remember the values entered use a Cookie
As u r doing an AJAX post, then-
Remove the <form> tags
instead of <input type="submit", use button
take the field values & AJAX post- on button click event
it might do the trick.
One of the reason is that site should have a valid certificate. If it is not secured site, password save prompt will not appear after login.

PHP register form strange error

i have a image hosting website, and my register form seems to be not working, every time i click on The second field it seams to go back instantly to the first field, Its really a pain in the b*m because whats the point if people cant register, does anyone know whats going on, i would really appreciate the help, Thanks.
Oh also my register form is located here - http://www.hostaimage.com/register.php
you shold try to wrap all the table in your html file with
<form method="post" action="register.php" name="myForm">
just put it before the tag.
also change the username field to something else
<input type="text" maxlength=30 size=30 name="username"> // change name="username"
<input type="text" maxlength=30 size=30 name="_username_">
there is already field calld "username" in this page - the field of your hosting website