Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
4 replies
Subscribers
7 subscribers
Views
1557 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
User Interface
Hi all, we have grid components in our forms. as you know, if grid has
eaglez
over 11 years ago
Hi all,
we have grid components in our forms.
as you know, if grid has some invalid fields, the whole column will be in error status after clicking submit button.
that is not very user-friendly, especially we have some customized validation, like length check.
is there a way to heighlight the invalid fields only?
fyi, we are using Appian6.71.
online waiting for you.
thank you very much.
...
OriginalPostID-91765
OriginalPostID-91765
Discussion posts and replies are publicly visible
Parents
0
eaglez
over 11 years ago
i'm using Appian6.71.
it seems it is different from what you said.it will validate the whole column.
maybe my JS code is not corrent.my current logic is if any cell in one column is invalid,then the field is invalid.
could you please take a look at it?
//this function is supposed to validate lenth
//both ordinary text field and grid text field.
function checkFieldLength(fieldId,length,isGrid){
var value = window.FormAPI.getValue(fieldId).id.trim();
//is grid field
if(isGrid){
//value of grid field contains multiple values which are joined by ";"
var valueArr = value.split(";");
for(var i=0;i<valueArr.length;i++){
valueArr[i] = valueArr[i].trim();
//return false if any cell in the column is invalid
if(valueArr[i] && valueArr[i].length > length){
return false;
}
}
}else{
if(value && value.length > length){
return false;
}
}
return true;
}
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
eaglez
over 11 years ago
i'm using Appian6.71.
it seems it is different from what you said.it will validate the whole column.
maybe my JS code is not corrent.my current logic is if any cell in one column is invalid,then the field is invalid.
could you please take a look at it?
//this function is supposed to validate lenth
//both ordinary text field and grid text field.
function checkFieldLength(fieldId,length,isGrid){
var value = window.FormAPI.getValue(fieldId).id.trim();
//is grid field
if(isGrid){
//value of grid field contains multiple values which are joined by ";"
var valueArr = value.split(";");
for(var i=0;i<valueArr.length;i++){
valueArr[i] = valueArr[i].trim();
//return false if any cell in the column is invalid
if(valueArr[i] && valueArr[i].length > length){
return false;
}
}
}else{
if(value && value.length > length){
return false;
}
}
return true;
}
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data