How to remove the "Please wait" message in Add Entry screen if the custom validation fails?

Confluence User - 01 Nov, 2017

Hi there, 

Basically, the Add Entry screen is calling from the form grid and I want to do some validation before the data is added back onto parent form.

The "Please wait" message is shown when i put in the "return false" statement in the custom HTML.  My intention actually want to force the user to key in the completion date if the completion status is set to yes.  Anyhow failed to do it.   Would appreciate for any workarounds.  Thanks.

 

******* Sample script as below *******

<script>
$(document).ready(function(){
// to validate the completion date field whem the ADD button is clicked

$("#submit").click(function() {


if ( FormUtil.getValue("subTaskCompletionStatus") == "Yes" && FormUtil.getValue("subTaskCompletionDate") == "" ) {
alert("Please select completion date if the completion status is set to YES.")
return false;
}
});

});
</script>

 

 

 

 

 

 

form;formgrid

7


03 Nov, 2017
confluenceUser
confluenceUser

Hi, you can try calling $.unblockUI(); to see if it works.

03 Nov, 2017
confluenceUser
confluenceUser

Tried already, but still cannot resolve. The "Please wait" still prompting. (refer my next answer)

03 Nov, 2017
confluenceUser
confluenceUser

Tried but failed too. The "Please wait" still prompting.  Please advise.  Thanks.

03 Nov, 2017
confluenceUser
confluenceUser

I tried calling $.unblockUI() when the Please wait screen is showing and it works. Are you calling it from the correct place? You can use your browser developer tools to debug.

03 Nov, 2017
confluenceUser
confluenceUser

On a different note, do you really need to use custom javascript to do the validation? Why not use proper validators for the form fields?

03 Nov, 2017
confluenceUser
confluenceUser

Only the status is set to Yes, and the completion date field is compulsory to fill in. That's why I am using custom HTML to check. I am not sure how to do it with default validators by Joget. Please advise. Thanks.

03 Nov, 2017
confluenceUser
confluenceUser

You can try to create another section with exact same completion date field but compulsory. Then use https://dev.joget.org/community/display/KBv5/Show+and+Hide+Form+Sections to control based on "status" value on which section to show - the one with/without compulsory date field.

RELATED QUESTIONS

Your answer


To answer a question you'll need an account.

Print