Questions tagged [html-select]
An HTML user interface element for choosing one or more option(s) from a finite collection of options.
5,157
questions
0
votes
1
answer
40
views
Generating a form with several long select elements is slow in Svelte
I'm writing an app in Svelte, and I have a page on which there is a list of values displayed as a table. I want to be able to edit these values, and one of the values is chosen by a select element ...
1
vote
1
answer
48
views
Select Option Over Flow the Web Page When Text More Than 200 Character
This Select Control Overflow the webpage
as Shown
<div>
<select id="animalName">
<option value="hamster">Hamster</option>
<option value="...
-1
votes
0
answers
15
views
React Select Component Overlapping Label and Placeholder
I have a Mui Select component for which I'd like to display both a label and placeholder. The challenge around setting a placeholder for the Select is fairly well documented. However, the solutions ...
0
votes
1
answer
14
views
How to fetch data from database using multiple dropdown in form laravel 5.4?
I have blade view which is basically a form consists of 3 dropdown value such as Division,District and Upazila.
my Index blade looks like below image.
after the submit button clicked,it shows me ...
-1
votes
0
answers
27
views
i get data by ajax but it doesnt show in select option tag
This is my code,
I can get my data by ajax and I can see it in my console but it doesn't show in option tag.
First I choose an option in another dropdown, then I must see the data in another selector ...
0
votes
2
answers
22
views
Is there a way to wrap an HTML Element inside an Option Tag?
For example:
<select {...props}>
<option value='my_option'>
<div className='flex justify-between items-center'>
<SomeIcon className='w-4'/>
...
-1
votes
1
answer
75
views
Angular ng-select not selecting the value while creating the dynamic control
I have a requirement to add city dynamically using ng-select because i need search option while entering city name. Lets say i have two city name saved in the new form and whil doing edit i have to ...
0
votes
1
answer
35
views
Within the HTML <select> how can I pre-fill a drop-down if I already have data for a contact?
I need to have a 'please select' on the drop-down which shouldn't be selectable, however when adding this it then doesn't display my existing data and is defaulting to just 'please select'
With the '...
-2
votes
2
answers
49
views
Can I get option elements from another file?
I'm working on creating a basic Naming Convention app. I've created a basic structure for it. The form has select elements and from dropdown, user will pick the best suitable option.
But there's one ...
0
votes
2
answers
87
views
How to add multiple dropdown list on same page in Blazor
I'm trying to insert same dropdown list multiple times in a single page.
I have an item X
I have a list of ProcessAreas (a,b,c,d,e)
I have a list of Instructions (1,2,3,4,5,6)
I need to create a form ...
0
votes
0
answers
28
views
make the Options of a Select smaller / very long text in the Options
I have been trying to control the length of an option when the text is very long and I would like the text to break a line when its content is greater than 300 pixels
My code:
.form-control-select ...
0
votes
1
answer
114
views
Accessibility in Dropdown / Select
For a sport site showing results on various events, I have three “dropdown” menus were I can do various selection.
Even though the UI is a dropdown, letting a user select from various options (the ...
-1
votes
1
answer
30
views
HTML Dropdown is not showing after opened with Live Server, coded in Javascript
I have created a code in javascript that will show a dropdown of color and age selection. However after I ran the code, the dropdown option was not showing. But, it still can be chosen and recorded ...
1
vote
1
answer
26
views
Lxml check if element is there and get href of sibling if true
I want to check if a specific element has text and if true I want to get the href of a sibling element. There are multiple Products like this on the site and I want to check each one for availability.
...
0
votes
1
answer
48
views
Error in Obj.length>0 in Datalist Validation
I have a script and i was running it over a website through tempermankey. The script is basically inserting a datalist in an input field and changing the other input value based on datalist selected ...
2
votes
1
answer
40
views
Multiple column select for Angular
I'm trying to find an open-source Angular library that will support multiple column selects. By that, I mean a library where the items will be arranged in multiple columns rather than each item having ...
-1
votes
3
answers
58
views
Sort Dropdown List Value From Database In Alphabetical Order [closed]
I'm able to populate my dropdown list with the values in my database. However, the list is unsorted and hectic due to large values. How can I have this list sorted in alphabetical order when the user ...
0
votes
0
answers
13
views
In my flask app, when I use request.form.get to get the value selected option, I get always none. Why?(I have name attribute to select tag)
I'm creating a Flask app, and in my tellmestory.html I have a form for users to select the age. In my app.py, I am trying to select the user's selected option but I always get None.
Here are some ...
0
votes
1
answer
21
views
Add blank first row to an SqlDataSource bound to DropDownList
So I am having an ASP.NET page for material ordering, where the users can order components for the production of a given product. The way it is structured:
First DropDownList lists all active ...
0
votes
1
answer
22
views
@HTML.DropDownList displaying names instead of ID
I'm new to MVC and I'm currently learning it for my future. I'm having a problem with @Html.DropDownList.
I want it to display ID, not names but it doesn't display as I wanted to.
View code
<...
0
votes
2
answers
71
views
how can I make a drop-down menu in html
By using the <select> and <option> tags I am finding it extremely difficult to make this example drop down list/menu in my HTML SoloLearn intro course
It's asking me to :
Add a drop-down ...
0
votes
1
answer
116
views
Style html select option values [duplicate]
I am trying to adjust the styles of selected option field in select element but not able to customise the selected value style.
Like below is my select option with correct style:
Other styles like ...
-1
votes
1
answer
30
views
Search not working when selecting multiple value from drop in php mysql
I am trying to search by selecting multiple value from drop down list. But its only showing result for last entered/selected value from drop down list rather then for all the selected value. here is ...
0
votes
1
answer
59
views
Why does a cypress test freeze when attempting to select an option by its position in the element cy.get() returns?
I am trying to select an option from the element that cy.get() returns. The element is a dropdown menu and it has an option that is not disables in the array position 1. However, whenever I run the ...
0
votes
0
answers
33
views
Dropdown field should become editable after clicking the edit button
I am trying to build an interactive website using Django Framework, HTML and JavaScript. Basically, I have a POST form that accepts submissions and sends them to the Database. The same page also ...
0
votes
1
answer
75
views
How to change the spacing of the options of a select using CSS only?
I have a dropdown using select/option, but I have a variant that have a span with an icon before the select tag, so I have to add a padding for the select to 'push' the placeholder in order to fit the ...
0
votes
0
answers
28
views
how do I differentiate the display of a selected option from a drop-down menu?
In my options, I make appear a name and a note (John - 4). But after selection, I would like only the name and not the note.
I saved the name like "John" of the selection result in a state ...
0
votes
1
answer
43
views
Typo3 News Extension Filter Custom Field
I use the news extension and have followed this instruction for creating a custom field to the news:
https://docs.typo3.org/p/georgringer/news/main/en-us/Tutorials/ExtendNews/ProxyClassGenerator/Index....
1
vote
2
answers
52
views
How do I detect a change in a select element in React?
I have an HTML form with a select dropdown for users to select a color, and I'm trying to detect when a new color has been selected. I've added the onchange attribute with a console.log() function, ...
0
votes
1
answer
35
views
How do I include spaces in InnerHTML when selecting values from a dropdown list in JavaScript and CSS?
How do I include the spaces into the value for InnerHTML ?
So I am selecting a value from a dropdown list, pulling an array list as a Constant in my JS file.
const AppleList = ['iPhone 6s' , 'iPhone 7'...
0
votes
0
answers
41
views
Default empty option for native select on Safari shows first option as selected
I have select with default empty option which works fine BUT:
When select is empty (first empty option is selected by default) first option has arrow as it selected on opening (checked with js that ...
-1
votes
1
answer
49
views
How to change text color of hidden <option>? [duplicate]
I want to change the text color of a hidden option.
The hidden option should be shown as a placeholder text not a selectable option and the placeholder should not shown as element in the select. It ...
0
votes
1
answer
43
views
Rails/Ruby select_tag and selected not working
have a problem with rails select_tag and the selected attribute, as it does not seem to pass the selected value, only all the items to controller.
In the view is below form block,
<div class="...
0
votes
2
answers
51
views
How to reset DropDownList to it's initial value/option
I want to be able to click on a button to reset the DropDownList to its initial value. In this example a role is to be selected. The initial role is ID 1 (Normal Role). How do I force the DropDownList ...
0
votes
0
answers
17
views
Why is this schema not storing the drop-down values to MongoDB?
I'm trying to store branch, year, semester and subject to the database. But it only stores the value name. I added the value name just for testing purposes to know whether my schema is storing ...
-1
votes
1
answer
38
views
How to make a default selected select react attribue a string?
I'm trying to make a default selected select react attribue a string. Is it possible with react?
https://codesandbox.io/s/test-login-page-tasks-forked-vkxnxg?file=/src/components/NewTask.js
//...
-3
votes
1
answer
40
views
How to save AND name AND value of a select menu in SQL?
Lets say we have this simplified example of a menu:
<?php for ($w=0; $w<10; $w++){ ?>
<div class="col-md-12">
<div class="form-group">
<select ...
0
votes
0
answers
51
views
How to scroll options in a select list? question about an answer
The original question was posted here : Set current item in a HTML <select>, but in the middle
In the question the author ask : "How to make that the selected item appears in the middle of ...
0
votes
1
answer
65
views
Set current item in a HTML <select>, but in the middle
This works to set a specific <option> as the currently selected item in a <select>:
var l = document.getElementById("list");
for (var i = 0; i < 100; i++) {
l.innerHTML += "<...
-1
votes
2
answers
53
views
How do I change the placeholder option of select in HTML and CSS?
I'm trying to change the color of the select option which has the value of "".
This is the HTML I have:
<select id="kategorija" name="kategorija"></select>
...
1
vote
2
answers
429
views
Style a HTML select according to the selected option in Angular
I would like to to style a select element in an Angular component differently, when a specific option (with an inactive attribute) is selected.
My component look like this:
class ComponentWithSelect {
...
1
vote
2
answers
206
views
How to select element which is defined under span from drop down menu
Hello guys can you help me on this?
Since I cannot select elements from dropdown menu which are in span, from better visual:
Here is html code:
<input type="search" autocomplete="...
0
votes
0
answers
22
views
Clear nested option html form field
Do someone know how to clear option nested field in form with f.e. jQuery or simple js?
My form is quite simple (in table):
<table width="100%">
<tr>
<td colspan="2&...
0
votes
1
answer
52
views
Vue 3 SPA. Select emits lang and contentStore DOESN'T renew content ONLY in mobile devices
Vue 3 SPA on Vite 4.2 and TypeScript 5.02.
Select on click emits lang.value and in the parent component App.vue contentStore should renew content. A typical thing that works perfect on my Linux Ubuntu ...
0
votes
0
answers
33
views
Drag and Drop multiple choice option using jQuery
I have a multiple choice option like below.
I would like to drag and drop Number of Pieces & Test Option using jQuery.
How can I do that ?
0
votes
1
answer
43
views
Save Dropdownlist value to database
I have a table with two columns containing dropdownlist, the second dropdownlist is populated based on the first dropdownlist selected value. Now i want to save the second dropdpwnlist selected value ...
0
votes
1
answer
52
views
Can onChange's event read only the inner tag's value?
I have a Select dropdown that listed some MenuItems, but now I want to add a ListSubheader. I am having issue grabbing the event.target.value from my MenuItem because I have to wrap them in a div tag, ...
0
votes
1
answer
120
views
Pass dropdown menu selection to Pyodide
I am trying to pass the value selected by the user from the dropdown menu to the Python code in Pyodide. In the simplified example below, I am trying to:
Read the user-selected input file
Convert ...
0
votes
1
answer
52
views
How to add navigation button to a Select component (MUI)
So i'm having this Select component from MUI and it works fine as it is. After selecting an item from the list, the router pushes to that location:
This is the code:
export default function ...
0
votes
0
answers
21
views
Show selector options always down
Regardless of the number of items,is it possible to open the selector options always down?
For example I have the following selector
html
<ul>
<li>An item</li>
<li>An item&...