- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2015 04:05 AM
instead of text field use a div in macro. it will render the html content very well. Also change the type of variable to macro with label and add question 'Short Description:' . macro should have following type of code
<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<div id="short_description"/>
<script>
function setDesc(text){
document.getElementById('short_description').innerHTML = text;
}
</script>
</j:jelly>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2015 04:36 AM
Gurpreet, fully correct answer to my question!!! thank You,
it is solved for me now.
I made notes about that for the future. Its sometimes hard get in to codes when not working with them every day.
Below is an image of how it looks like when training is selected. I also created wizard UI policy to hide macro if training field is empty so the macro label doesn't disturb/confuse users
Thanks a lot for your time on this, very appreciate this
/Petr
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2015 01:09 PM
Thank you for this solution - I great solution to get your Links on the catalog form since there is no URL Catalog variable type available.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2016 07:27 PM
Do you know how I can pass a url to a ui macro so that it will display on my catalog item in this manner:
I am building a url on change of a variable on my catalog item but a client script making an ajax call to a table with some specific values. So I return a url that is similar to this:
https://xxxxxxxx.wustl.edu/docid=1234&invid=65434&docdept=65434
I want this to then display on my catalog item more like this:
Click here to View Image
I am thinking I need to use a UI Macro variable. i am able to pass the url to the ui macro but I can't figure out how to then get the code in the ui macro to be able to insert it into the <a href tag.
Any help would be appreciated.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2016 09:23 PM
Hi Rhonda,
Suppose u are having url in a variable called url then u just need to build HTML String as follow
var url = 'https://google.com' ; //get it using ajax
var text = '<a target="_blank" href="'+url+'">Here</a>' ;
//then use the same function (setDesc) to set above html in the macro
setDesc(text) ;