Semantic is a UI component framework based around useful principles from natural language. Forkable JSFiddle: https://jsfiddle.net/ca0rovs3/
<script>
$(document)
.ready(function () {
$('.ui.form')
.form({
fields: {
gradename: 'empty',
password: {
identifier: 'password',
rules: [
{
type: 'empty',
prompt: 'Lütfen şifrenizi girin'
},
{
type: 'minLength[6]',
prompt: 'Şifre en az 6 karakterden oluşmalı'
}
]
},
username: {
identifier: 'username',
rules: [
{
type: 'empty',
prompt: 'Lütfen kullanıcı adınızı girin'
},
{
type: 'minLength[4]',
prompt: 'Kullanıcı adı en az 4 karakterden oluşmalı'
},
{
type: 'maxLength[32]',
prompt: 'Kullanıcı adı en fazla 32 karakterden oluşmalı'
}
]
}
}
})
;
$('.ui.dropdown').dropdown();
})
;
</script>
Hi All,
I am trying to use API for form submit. I am making a request to my dummy server right now. But strangely, the successTest
callback is not being called.
Can somebody please help me out.
url: 'http://localhost:7000',
method: 'POST',
serializeForm: true,
beforeSend: function (settings) {
console.log("Data submitted: ", settings);
//We will now create a request packet here
return settings
},
successTest:function (result) {
console.log("this is the result", result);
return true
},
onSuccess: function (response) {
alert('success');
console.log(response);
//Call chart create
},
onFailure: function (response) {
//alert('failure',response);
console.log("fail ",response);
}
});
Hello,
I cannot populate a dropdown from the javascript. Below is the code.
html
<div class="ui fluid search selection dropdown values">
<input type="hidden" name="values" selectOnBlur={false}>
<i class="dropdown icon"></i>
<div class="default text">Select</div>
<div class="menu">
</div>
</div>
JS
$('.ui.dropdown.values').dropdown({values:[{name:"oi",value:32},{name:"yo",value:2}]})
for some reason i am not able to fill up the options. I tried something similar on the Semantic UI dropdown page, I was able to successfully populate there.
Can somebody please help me out.