Invoke custom URI scheme after form submit

Confluence User - 31 Oct, 2024

I have a form. I need when the form submitted to also invoke a custom URI scheme (like tel://xyz) to open an application in the local machine. It works if I use it as hyperlink but I need it also as a post form submitting process and not only as independent hyperlink.

forms;postformsubmission

2


01 Nov, 2024
confluenceUser
1
confluenceUser

To implement the automatic redirection with custom URI scheme, follow these steps: Add an empty Rich Text widget. Add the below code using custom HTML and you can hide the rich text widget.


<script> 
$(document).ready(function(){
 	window.location.href = "outlook:";
 }); 
</script>



Configure the redirection to the rich text after form submission



This setup will:

  1. Process the form submission
  2. Redirect to the specified Userview page
  3. Automatically trigger the uri scheme application and also you can pass submitted form fields in the url and use them in the uri scheme. 

25 Feb, 2025
confluenceUser
confluenceUser

I tried it. It works! But the problem is that I don't want to redirect. I want to stay in the form as is the default behavior. I thought AJAX call but AJAX supports only calls to http and https not to custom URI schemes. Another workaround that is accepted by our customer is to close the tab after the call to custom uri scheme. After the form is submitted and the desktop application is opened by calling the custom URI schema, the task is considered as "completed" and the web page has no reason to exist.

RELATED QUESTIONS

Your answer


To answer a question you'll need an account.

Print