I want to verify certain properties of a model are filled out right before allowing a user to click a Submit button.
My plan is to disable the button and enable it based on the result of a JavaScript snippet that is being run.
There may be an easier way to do this but what i am trying is to create a UI.Only checkbox field in the model. Then set that field via the JavaScript snippet if the entries validate via my custom code.
If so then there would be an enable condition on the button which would then allow the user to click the submit button.
Here is what I have tried.
var model = skuid.model.getModel(theModel),
row = model.getFirstRow();
console.log(row.applicationComplete);
row.applicationComplete=true;
console.log(row.applicationComplete);
The first log comes through as undefined. The second shows as true. So the row seems to be updating in memory but the field is not showing the check in the checkbox on the page and my button which has a condition looking for applicationComplete to be true does not seem to see that the value has been set.
I am missing some sort of a step just not sure which one(s).
Question
How do I set the value of a model UI only field via Javascript so that it can be evaluated within a
This topic has been closed for replies.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
