OL Learn

COTG Application

I have a COTG application workflow that is generating html and sending to the COTG app. The form is in the repository, it is downloaded and added to the Library. The form that is in the library I would like to always be blank, can be opened as many times as needed (ideally would be refreshed as the same blank form after each submission) and submitted to workflow. Right now when I add content to the COTG document, submit and then re-open the form in the library, the content that was previously submitted is still there. I tried checking “blank form” but that will require me to always re-download the repository form and save as a new name.

Hi @APoole,

Have you already tried if you can empty a COTG form each time you open the document in the COTG application by making use of for example the following JavaScript (JQuery) code:

$(document).ready(function () {
	$("form#example input").val("");
});

I added the following to the web source code under the script tag at the beginning of the html.

$(document).ready(function () {
$(“input:text”).val("");
});

The form is still populated with the last entries when reopened.

A option is to add a Reset button to your FORM-element via “Connect Designer > Insert > Form Elements > Button” where “Button Type” is “Reset”. And to reset the COTG form manually each time you open the form in the Capture OnTheGo application.

Another option is to add the same Reset button to your FORM-element but in this case as a hidden element (CSS: display: none;) and to make use of the following JavaScript code:

HTML:

<button id="reset-btn" value="Reset" name="reset-btn" type="reset" style="display: none;">Reset</button>

JavaScript:

$(document).ready(function () {
	$("button#reset-btn").click();
});