FAQ Database Discussion Community


Update price based on select options

jquery,html-select
I have multiple select options in a form with prices attached to each with data-price. When any option changes or is selected i need to update the price based on all the selections. I have tried the following: http://jsfiddle.net/325x2d8e/ html: <h3>Size</h3> <select class="form-control calculate" id="size" name="size"> <option data-price="5.00" value="Small">Small</option> <option...

Angular blank option selected

javascript,angularjs,select,angularjs-ng-repeat,html-select
I'm banging my head against the wall on this one. I have an array of objects that will be used to populate a select drop down: CardCount = [{"ClientId": "0010", "Description": "0010 (206 Members)"}, {"ClientId": "0051", "Description": "0051 (1 Member)"}, ........] When I attempt to use ng-options, the value of...

How to properly resize select form input

html,forms,html-select
I have a form which uses both text fields as well as select options. I styled the form using the following CSS: input[type=text] { width: 250px; height: 30px; text-indent: 10px; border-width: 3px; border-color: rgba(50, 50, 50, 0.14); margin: 10px 10px 10px 0px; padding: 5px 5px 5px 5px; } select {...

Angularjs xeditable selected option not shown

angularjs,html-select,x-editable
I have editable rows in a table and I can't seem to show the selected value in my dropdown list. Everything else in the process works fine. Code at: http://jsfiddle.net/bzLj3a5q/7/ Html: ... <span editable-select="ad.ad_type_id" e-name="ad_type_id" e-form="rowform" e-ng-options="id as type for (id,type) in ad_types" onshow="showType(ad)"> {{ ad_types[ad.ad_type_id] }} </span> ... Controller:...

How set height of select dropdown list in IE 9 [duplicate]

html,css,internet-explorer,internet-explorer-9,html-select
This question already has an answer here: Height of an HTML select box (dropdown) 5 answers I found a bug with select tag in IE 9... In IE 10 and 11, FF, Chrome, Safari everything works fine, but in IE 9 - when list with options become visible, it's...

Javascript if an option is selected than a new sets of option appear

javascript,jquery,html,forms,html-select
In a nutshell, I would like that when the user selects an option, a set of options appear in relationship that option selected. Below is what I have done thus far: The HTML: <form method="" action=""> <input type="file" placeholder="Upload Project"> <select id="selectProvider"> <option disabled selected> Select Training Platform </option> <option...

Insert hidden text inside selectbox option

php,html-select,hidden
I have a selectbox that displays name and surname for a list of people. But I want to add an id for each of them and make it invisible. EX. if we have John Smith with ID 001 I want to write John Smith:001 , but it should be seen...

Autocomplete-like interface with separate ID field?

jquery,autocomplete,html-select
I'd like to use jQuery Autocomplete to offer a sort of interactive dropdown in my form. However, I'd like to display 2 fields - the ID and the description. While it is easy to output both, I can't find a way to keep the ID and the text you want...

Bootstrap3 + Angular with Select causes the drop down to cut off

angularjs,html5,twitter-bootstrap-3,html-select,ng-options
I am trying to use the HTML Select tag along with AngularJs using the ng-options directive to create a drop down options menu. On top of this I am using Bootstrap 3. I also have ui-bootstrap imported into the project. Everything works functionally but I have an odd issue where...

Kendo dropdown with ng-options instead of DataSource

javascript,angularjs,kendo-ui,html-select,angular-directive
I've got a dropdown list defined using angular like this: <select class="form-control" ng-model="controller.selectedUser.superiorId" ng-options="superior.userId as superior.lastName + ' ' + superior.firstName for superior in controller.superiors | orderBy:['lastName', 'firstName']"></select> This works fine, however I want to show a little image next to the entries and so I'm trying to convert this...

Dropdown first option value not functional

php,jquery,location,html-select
I have a problem whit my dropdown list, I need to change location page when option selected using value option attribute, but the first option element not functional, This is the html code: <form> <select class='language-select' name='URL' id='URL'> <option value="index.php?lan=EN" selected> English</option> <option value="index.php?lan=FR">Français</option> </select> </form> and this is the...

Formatting dates in an MVC Dropdown

date,model-view-controller,html-select
I have a dropdown list on my page as so: - @Html.DropDownList("dd_dates", new SelectList(@Model.seasonDates), "Please Select") where seasonDates is an IList of dates. The problem is that when the dates are displayed in the dropdown they also have the time on them as well. How do I format the display...

How to get a deleted element in a contenteditable div?

javascript,html,html5,javascript-events,html-select
I set the root div to contenteditable, and it contains many img and video elements. So when a user edits it and presses backspace to delete one element, How can I get which one the user deleted and get the deleted element's attributes values?

Can't change select option item angular

javascript,json,angularjs,html-select,angular-ngmodel
I have a select option like this: <select ng-init="filterSelected = getItems.data.key" ng-model="filterSelected" ng-options="data.key as data.label for data in getItems.data" ></select> In which i parse a json that returns me some results that shows as item in this select. This is not a problem, i can display the items but i...

Having trouble getting element?

javascript,internet-explorer,reactjs,html-select,internet-explorer-10
Say I have the following React element (example fiddle here): var Hello = React.createClass({ getInitialState: function() { return {parsed: false}; }, _parseEvent: function(event) { var parser1 = event.currentTarget.selectedOptions[0].value; var parser2 = event.target.value; var parser3 = event.nativeEvent.srcElement.value; if (parser1 && parser2 && parser3) this.setState({parsed: true}); }, render: function() { var parsing...

Html\CSS - unable to align custom Select tag along with a custom Checkbox

html,css,checkbox,html-select
I've created several custom checkboxes, where the first element is also a select element. I need all the elements to be in the same line, but in order to reduce the margin between each line I used line-height=something property, but this causes the text of the select element to be...

HTML select with angularjs ng-options to MVC Model, can't do it

html,asp.net-mvc,angularjs,html-select
I'm trying to insert my selected value to MVC model. I saw some answers with @Html.DropDownList but i can't figure it out. this is my select code : Manufacturer : <select ng-model="UserCarManufacturer" ng-options="I.id as I.name for I in CountryList" ng-change="GetState()" class="form-control" id="CarManId"> <option value="">Select Manufacturer</option> </select> {{UserCarManufacturer}} {{UserCarManufacturer}} is the...

Laravel 5 array validation

arrays,validation,laravel-5,html-select
In laravel 5 how do i validate an array to check if at least one value is selected - the following doesn't work? 'user_list[]' => 'array|min:1', {{ Form::select('user_list[]', $users, null , ['multiple' => 'multiple']) }} ...

filtering not working from select

jquery,table,datatable,filtering,html-select
I have created a application with dataTable with fixed headers and sorting, the application is working fine but the issue is that I am having a name filtering through a drop-down, which is not working when I select a particular name. My code is given below. Can anyone please tell...

  in script is not getting compiled

javascript,angularjs,html-select,angular-filters
I have created an application in AngularJS with a drop down with space in option using a filter. The application is working fine but the &nbsp; which I have put for space is not getting compiled. My code is as given below JSFiddle html <select> <option ng-repeat="(key, value) in headers">{{value...

jQuery - hide option element by value

jquery,select,hide,html-select
Trying to hide an option element from a list. I have tried several methods however, cannot seems to work. I need to call select by name as I cannot add ID or class. $('select[name*="boxes"] option[value="box6"]').hide(); here the fiddle: http://jsfiddle.net/q2nb08t6/ any suggestions?...

How to generate select option in laravel?

php,laravel,html-select
I am converting my project to pure laravel. Here is my option select tag in html How I can convert it in pure laravel which should also have class name in it <select class="field" name="number"> <option value="0">1</option> <option value="1">2</option> <option value="2">3</option> </select> ...

WTForms usage for dynamic options?

javascript,google-app-engine,html-select,wtforms
I use WTForms with Jinja2 in appengine and I have a dynamic option field where the available choices for a city depends on the choice of a region. Now I want to enable validation also for regions and cities (mainly if a user didn't select a region/city) but I don't...

Select default value of