EasyUI Forum
May 03, 2024, 05:09:42 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Set validType for all validatebox on form  (Read 5783 times)
phunksta
Jr. Member
**
Posts: 54


View Profile Email
« on: November 17, 2015, 09:59:14 AM »

I'm sure this is just a jquery thing, but I want to set the option:

Code:
validType:'remote'

... dynamically using javascript, for all of the validatebox (including descendants i.e. textbox, combo etc.) on a form.

I have tried a few combinations of jquery selectors based on class, tried grepping inputs for prefixes of 'easyui-' but whatever I do I don't seem to be able to get a clean iteration over the validateboxes on a form.

I don't wish to set a default, because my app has plenty of other easyui controls that should not have this set. I also don't want to have to go into the markup because again, this comes from a dynamic source.

Can anyone help me with a selector that will let me add this option to a bunch of validatebox inputs?

Thanks for any help in advance!
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: November 17, 2015, 06:04:34 PM »

Try this code to set the 'validType' for all the validatebox components.
Code:
$('.validatebox-text').each(function(){
$(this).validatebox('options').validType = ...;
})
Logged
phunksta
Jr. Member
**
Posts: 54


View Profile Email
« Reply #2 on: November 18, 2015, 02:43:28 AM »

Gah stworthy you make this look so easy!  Wink

Thanks so much again!
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!