Comments (6)
I have noticed that in 1.1 version the selected item is not inside options, so the syntax that works would be
$('#form').w2form({
name : 'form',
url : 'server/post',
fields: [
{ name: 'field_enum', type: 'enum', required: true,
options: {
items: [
{ id:'0', text:'Adams, John' },
{ id:'1', text:'Johnson, Peter' },
{ id:'2', text:'Lewis, Frank' },
{ id:'3', text:'Cruz, Steve' },
{ id:'4', text:'Donnun, Nick' }
]
},
selected: [
{ id:'1', text:'Johnson, Peter' }
]
}
]
});
I will change it to be inside of the options in the next release.
About required: true for a w2field - this is not supported for the field. Only for the form.
from w2ui.
Fixed. Now if you download latest, this syntax is correct:
$('#form').w2form({
name : 'form',
url : 'server/post',
fields: [
{ name: 'field_enum', type: 'enum', required: true,
options: {
items: [
{ id:0, text:'Adams, John' },
{ id:1, text:'Johnson, Peter' },
{ id:2, text:'Lewis, Frank' },
{ id:3, text:'Cruz, Steve' },
{ id:4, text:'Donnun, Nick' }
],
selected: [
{ id:1, text:'Johnson, Peter' }
]
}
}
]
});
from w2ui.
Hi Vitmalina,
This is vijay, I am using options selected inside searches like following,but it is not working please help me.
<script> var numbers =['1','2','3','4','5','6','7','8','9','10','11','12','13','14','15','16','17']; ------ W2UI Grid Code ------ searches: [ { field: 'recid', caption: 'ID ', type: 'int' }, { field: 'lname', caption: 'Last Name', type: 'text' }, { field: 'fname', caption: 'First Name', type: 'text' }, { field: 'email', caption: 'Email', type: 'list', options: { items: people,selected : {'5'}}}, //--> Not Working { field: 'sdate', caption: 'Start Date', type: 'date' } ] </script>Thanks,
Vijay
from w2ui.
Not working for me either
I'm using 1.4.3
Is there any workaround or fix to make it work ?
from w2ui.
Please provide a jsFiddle as an example.
from w2ui.
Hello,
Thanks for your reply.
I actually found a way around by setting the record node with the selected item to force it
Best regards
PS : By the way : great framework !
................................................................................................................
Le Responsable
Olivier SIVRIERE
................................................................................................................
WESH PROD Studio
1800
Avenue André Lasquin
74700 Sallanches
tel : +33(0)4.50.47.55.36
[email protected] - www.weshprod.com
....................................................................................
................................................................................................................
Le 7 déc. 2015 à 18:19, Vitali Malinouski [email protected] a écrit :
Please provide a jsFiddle as an example.
—
Reply to this email directly or
view it on GitHub.
from w2ui.
Related Issues (20)
- regex changed in method isAlphaNumeric(val) => ids using paragraph sign are evaluated as invalid HOT 1
- How to use w2ui-2.0 in react? HOT 2
- Grid toolbar refresh with multiSearch enabled shows overlapping controls HOT 1
- Clicking in a grid without records generates script error HOT 2
- How can I prevent the loading message tip from appearing when grid.reload is called?
- Update sidebar.topHTML after initialization HOT 4
- Double-clicking on w2tab makes it invisible
- Deselecting a row with a mouse click stopped working. HOT 3
- W2db.php (server/php) doesn't work on PHP8 HOT 1
- w2grid markSearch() not properly escaping values when highlighting search results HOT 3
- Grid context menu does not close, appears multiple times on right clicks
- Grid advanced search script error when searching with empty input
- Weird ENTER key behavior in Inline Edit with selectType = Cell HOT 2
- w2grid.onSelect event not working corectly
- Как в форме в полях вывести Label большой длины, что бы не срезалось наименование поля HOT 2
- w2ui-lock
- w2grid: when property reorderColumns is true, sorting columns doesn't work as expected
- Form in a popup HOT 3
- w2ui grid - password renderer error if password undefined HOT 2
- square button shape HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from w2ui.