Create a Custom Input using multiple forms

studio
inputbox

#1

Hi All,

I am having an issue creating a UI for the custom input for one of the processes we use.
The process requires different inputs depending on the part of the application it navigates to, and as such i decided it would be best to use multiple HTML forms and set them to appear by clicking buttons on a side navigation.
In order to save me from forgetting to include a form for a given path in the process I have included a javascript in the page load to add the form id to the sidenav as a link (in order to make the form appear). This works as expected in all common browsers ,ie,edge,firefox and chrome, however when i run it in studio i get the following error:image
Can anyone please help? Code in javascript is :
function CreateFormLinks() {
var formls = document.getElementsByTagName(“form”);
var c;
for (c = 0; c < formls.length; c++) {
var nav = document.getElementsByClassName(“sidenav”);
var newlink = “<a href=”#" onclick=“ShowForm(’” + formls[c].id + “’)”>" + formls[c].id + “”;
nav[0].innerHTML +=newlink;
if (c === 0){
document.getElementById(formls[c].id).style.visibility=‘visible’;
}else{
document.getElementById(formls[c].id).style.visibility=‘hidden’;
}
}
}


#2

I have done a bit of investigation on the issue and I suspect that as this is an HTML DOM command, the browser used by UiPath to generate the view is not equipped to be able to handle that. Is there an expert who can confirm that?

Regards,
Savvas


#3

Looks like “getElementsByClassName” is not compaitable in IE 6-8.

https://caniuse.com/#feat=getelementsbyclassname

As a work around you could use force IE 11/10/9 compatibility mode and give a try.

<head>
<meta http-equiv="X-UA-Compatible" content="IE=11" />
</head>

#4

Hi vvaidya

I was using <meta http-equiv=“X-UA-Compatible” content=“IE=edge” /> as per microsoft guidance to force the use of the latest available browser type.

I have entered your <meta http-equiv="X-UA-Compatible" content="IE=11" /> and my forms are now behaving as expected.

Thank you very much for your help.


#5

Good. It works for me with “IE=edge” as well and my IE version is 11.