- Mark as New
- Follow
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report
Susila,
You could also try making your message a bit more descriptive by telling the user where exactly their form needs to be completed. for example:
var rowIM = xfa.resolveNode("page1.Table1.sectionRow").instanceManager;
var completed = true; //flag to determine if i == rowIM.count
for(var i=0;i<rowIM.count; i++){
if( xfa.resolveNode("page1.Table1.sectionRow[" + i + "].Item.Quantity").rawValue == null ||
xfa.resolveNode("page1.Table1.sectionRow[" + i + "].Item.Cost").rawValue == null){
displayMessage(i); //display the "Please enter all values" message
completed = false; //we will not be getting to i == rowIM.count
break; //quit checking and force a resubmit by the user
}
}
if(completed){ //all fields filled out correctly
app.alert("Form Submitted...");
}
function displayMessage(row){
app.alert("Please enter a Quantity and Cost for item " + row);
}
This will shorten your code up a bit, and give the user more help with narrowing down which item they need to modify for a successful submit. Glad you got your script and bindings working though!
Alex
Views
Replies
Total Likes