Mandatory Related Item
- Dmitry Kozlov
- Site Admin
- Posts: 1524
- Joined: Thu Jun 07, 2012
- Dmitry Kozlov
- Site Admin
- Posts: 1524
- Joined: Thu Jun 07, 2012
Hi,
Do you mean that you want to activate a tab containing the Related Items control if a user left it empty? Then, please, use the code below:
Replace (1) in the line: fd.tabControl(0).tabs('option', 'active', 1); with 0-based index of the tab containing the related items.
Do you mean that you want to activate a tab containing the Related Items control if a user left it empty? Then, please, use the code below:
Code: Select all
fd.onsubmit(function() {
if (fd.relatedItems(0).data('ctx').ListData.Row.length == 0) {
alert('Please, add related items');
fd.tabControl(0).tabs('option', 'active', 1);
return false;
}
return true;
})
-
- Information
-
Who is online
Users browsing this forum: No registered users and 5 guests