EasyUI
Home
Demo
Tutorial
Documentation
Download
Extension
Contact
Forum
EasyUI Forum
October 16, 2024, 01:19:48 AM
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
:
Home
Help
Search
Login
Register
EasyUI Forum
>
General Category
>
EasyUI for jQuery
>
[SOLVED] Validation required show tab
Pages: [
1
]
« previous
next »
Print
Author
Topic: [SOLVED] Validation required show tab (Read 2121 times)
jega
Full Member
Posts: 199
[SOLVED] Validation required show tab
«
on:
September 01, 2023, 09:24:30 AM »
Hi.
On validation, how can i show the tab where the required textbox is ??
Jesper
«
Last Edit: September 01, 2023, 09:31:00 AM by jega
»
Logged
jega
Full Member
Posts: 199
re: Validation required show tab
«
Reply #1 on:
September 01, 2023, 09:29:54 AM »
Ohh, just found it in another topic
$('#ff').form('submit', {
onSubmit: function(){
var form = $(this);
var isValid = form.form('validate');
if (!isValid){
var field = form.find('.validatebox-invalid:first');
var panels = $('#tabs').tabs('tabs');
for(var i=0; i<panels.length; i++){
var panel = panels
;
if (panel.has(field).length){
var index = $('#tabs').tabs('select', i);
setTimeout(function(){
field.focus();
},0)
break;
}
}
}
return isValid;
}
})
Logged
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General Category
-----------------------------
=> News
=> General Discussion
=> EasyUI for jQuery
=> EasyUI for Angular
=> EasyUI for Vue
=> EasyUI for React
=> Bug Report
Loading...