Could I make a Question Choice a hyperlink?

JLeong
Mega Sage

I need my selection list to be hyperlinks. I would like to link it to another form, is this possible?

Thanks in advance.

1 ACCEPTED SOLUTION

Raju Koyagura
Tera Guru

I am not sure about providing hyperlinks in choice list but there is an alternate workaround for this applying onChange script based on the choice values.


Script:


function onChange(control, oldValue, newValue, isLoading, isTemplate) {


    if (isLoading || newValue == '') {


          return;


    }




    if(newValue=="Your Choice Value 1")


    window.location.href='problem.do';


if(newValue=="Your Choice Value 2")


    window.location.href='incident.do';


.............................


}


View solution in original post

13 REPLIES 13

Raju Koyagura
Tera Guru

Check the choice element value of "Corporate FTP" , in if condition you have taken label name, take the element value. Moreover in the alert you given 'new value', actually that should be without any colons newValue. So if you get any result in it, your script will work fine.



function onChange(control, oldValue, newValue, isLoading) {


  if (isLoading || newValue == '') {


  return;


  }


  alert(newValue); //Take the value this is the actual element value.


  if(newValue=="Corporate FTP"){


  alert(newValue);



  window.location.href="https://rrd.service-now.com/com.glideapp.servicecatalog_cat_item_view.do?v=1&sysparm_id=b74b3622bd82...";



  }


}


The element value is Corporate FTP. No spaces, I double checked.


find_real_file.png



Still not opening the link.



I really do believe, I need to open it in a new window


Are you getting any alert?



Sent from my iPhone


Yes, I get the newValue alert.


Can you check popup blockers on your browser and try it in multiple browsers?



Sent from my iPhone