EasyUI Forum
May 19, 2024, 10:58:05 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: textbox uppercase forced  (Read 7949 times)
crosemffet
Jr. Member
**
Posts: 68



View Profile WWW Email
« on: June 15, 2017, 03:55:05 PM »

hello and thanks in advance for supporting me.
I'm trying to get one textbox with only upper text, so each time the user types "a" the textbox capitalize to "A", so if the user types "hello" it will see "HELLO".
I'm trying to make it work using formatter function, without results.
here's my code:
<input class="easyui-textbox" id="notes" name="notes" label="Notes:" labelAlign="right" data-options="prompt:'input your notes',formatter:function(value, row){return value.toUpperCase();}" style="width:340px">
also try with:
$(function(){
       $('#notes').textbox('textbox').css('text-transform','uppercase');
});
still without working....
any idea...?
thanks again,
« Last Edit: June 15, 2017, 04:04:54 PM by crosemffet » Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: June 16, 2017, 04:16:21 AM »

Just need to add this code to the page.
Code:
<style type="text/css">
.textbox .textbox-text{
text-transform: uppercase;
}
</style>
Logged
crosemffet
Jr. Member
**
Posts: 68



View Profile WWW Email
« Reply #2 on: June 16, 2017, 04:34:57 AM »

thanks stworthy, your solution works like a charm !.
just to know, what's wrong whit this code..?
$(function(){
       $('#notes').textbox('textbox').css('text-transform','uppercase');
});
why is not working...?
just to learn....
thanks again,
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #3 on: June 16, 2017, 06:45:34 AM »

This code works fine, too. Please look at this example http://code.reloado.com/ososof4/edit#preview
Code:
<input class="easyui-textbox" id="notes" name="notes" label="Notes:" labelAlign="right" data-options="prompt:'input your notes'" style="width:340px">
<script>
$(function(){
       $('#notes').textbox('textbox').css('text-transform','uppercase');
});
</script>
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!