I'm wondering if theres a way where i can stop a datalist from showing on a specific text box, without stopping a datalist being used in another textbox from autocompleting to this field.
Related
I have an advanced search form that terms/rows can be added to dynamically. I have noticed that the larger the form, then slower the form is when you click in a text field. Sometimes, you click in a text field and wait around 2 seconds on a moderately sized form before anything typed shows up.
It only happens when the text field is initially empty - and only in Safari.
I discovered that if I go into the Safari Preferences, go to the "Autofill" tab, and turn off all "Autofill web forms" checkboxes, the form is zippy - no lag. Apparently, Safari is trying to figure out how to suggest things to enter, like info from my contact card, usernames and passwords, credit cards, etc...
This advanced search form doesn't seem relevant to any of that (unless it tracks repeatedly entered search terms...?). So here are my questions:
Is there a way to tell Safari to not look for autofill possibilities, so that my form doesn't have this lag in Safari?
If #1 isn't an option, is there a way to make Safari's suggestions more efficient - so it can more quiickly figure out that there's nothing to suggest?
Regarding #2, my text fields have no label. The "labels" are the values chosen in the preceding select lists. Here's an example:
Note that after the 1-2 second delay, the autofill icon appears in the field:
Could adding hidden labels make Safari's autofill feature more efficient?
I tried and failed with various "solutions" I found here on stack:
Set attribute autocomplete="off" in both the form and input elements
Added a hidden label both above and below the input tag
Added a class name suggesting the input field type
Tried a javascript solution
None of them worked. I still experienced a delay between clicking in a field and being able to enter text - and the user icon still presented phone number suggestions from my contact card.
I read an old, but otherwise helpful article about how to coax autofill to fill in the correct information. It didn't mention the solution I stumbled upon, but it inspired me to try it...
I added a placeholder attribute to the text input in my django form class:
val = forms.CharField(widget=forms.TextInput(attrs={"placeholder": "search term"}))
And that did it! Now when I click in a search term field (which now shows "search term" in light gray - which is grudgingly OK with me), I can enter text right away and the autofill icon does not appear!:
I can't seem to find how to make this work - selecting an option from the drop-down list & submitting it using a submit button then having an alert / text box show after after clicking submit button. Is it possible ? TIA
What language do you use? if it web, you can add javascript to check your value dropdown.
you can add onSubmit on your form
We've got a checkbox on a form that we'd like to be able to check/uncheck even whilst the form is opened as read-only (it's a sales/product form and when an order has been invoiced, we want to prevent changes).
I know I could add a command button in its place and even make that button look like it's a checkbox with some images, or even set up a key combination to be used instead of the checkbox, but first I'd like to know if it's possible to simply exclude one checkbox from being read-only on a read-only form.
No. You must go the other way around:
Make the form read-write, then disable all controls bound to data fields except this single checkbox.
This may be a possible bug in Polymer: If I type in an input that has been typed in before, a series of autocomplete values may come up. If I select one using the up/down arrow keys and pressing the Enter key, the element's invalid attribute does not change to false even though the input is valid, however, the input element is stylized as being valid without the red text/underline.
If I tab or click outside of the element (onblur) it does not cause the field to validate. If I click back inside or tab back into the field, backspace one letter and retype, the elements invalid attribute will be properly set.
This has been tested with a regular paper-input and gold-zip-input in Safari 8.0.7.
Work around: As a possible work around, I would like to disable autocomplete for certain input fields. I can't find any documentation to do this. The HTML5 autocomplete attribute has no effect. Is there any way to turn off autocomplete in Polymer?
I am using the blueimp/jQuery-File-Upload basic plugin.
In a form, the input field for uploading files is, by default, on the right of the button.
A text is also written into.
How can I have the field on the left and how can I get rid the text ?
What you are talking about is standard browser behavior. When you use <input type='file'>, the browser chooses how to render that, and it can give it its own default text like 'Choose file'. I have used a workaround in the past which works nicely, provided in the link below (which will scroll you to Romas' answer). Basically you hide the file input, and declare another button that you style however you wish.
In JavaScript can I make a "click" event fire programmatically for a file input element?