Forum Index

No notifications
Notifications

Favorites

No favorites found
General Training Discussion General chat and comment on KnowledgeKube training
KnowledgeKube Training > General Training Discussion > Clearing validator View modes: 
User avatar
KnowledgeKube Staff
KnowledgeKube Staff
matt.pitman - 30/09/2016 15:14:28
   
RE:Clearing validator
As a work-around, one of my colleagues has suggested using a formatted Content Block (or a styled Read Only Text) combined with a Visibility Expression to produce your validation message. You can use the expression on one or more buttons to modify the value of a variable, and use that value as a flag to control the visibility of the message. Since Visibility Expressions are evaluated each time the form loads or posts back - whereas a Validator Expression will only react to postbacks on the same page - this would be a more reliable way of achieving your aim here. The added benefit of using a content block is you can apply in-line styling and deploy re-usable assets to have consistent validation messages in more than one location. Let me know if any of this is unclear. Kind regards.

User avatar
KnowledgeKube Staff
KnowledgeKube Staff
matt.pitman - 30/09/2016 10:36:50
   
RE:Clearing validator
I've recreated the issue you described, and referred the matter to the development team here at Mercato to get their input. There may be a better way of implementing this functionality, or we may need to utilise a work-around in the short term. Either way, as soon as I know more I will let you know. Kind regards.

User avatar
Advanced member
Advanced member
Arun Murthy - 29/09/2016 09:29:33
   
RE:Clearing validator
Hi Matt, For my case I have a Validator question type to check a Number question type is more than 0. 1st: I set the number to -1, and it will show the validator. 2nd: I press a back button, it will go to another question group, and I clear the form by RemoveModelFormResponses Lastly: When i go to the form again, the validator is still set to true Thanks

User avatar
KnowledgeKube Staff
KnowledgeKube Staff
matt.pitman - 29/09/2016 08:56:04
   
RE:Clearing validator
Hi Arun, Are you able to provide more information? It would be good to know what you're using to call the function, and whether you're calling it within the same question group as the Validator you're trying to clear. Under normal circumstances, a validator message will disappear when the associated expression evaluates to False. If the validator is triggered at the same time as you're trying to call RemoveModelFormResponses, the function will not execute successfully and the validator will continue to show. Kind regards.

User avatar
Advanced member
Advanced member
Arun Murthy - 29/09/2016 02:34:02
   
Clearing validator
Hi, I use the below to clear the form, but it wont clear the validator.
RemoveModelFormResponses("FormKeyword","",2);

RSS Feed