- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-27-2018 06:30 AM
Hello,
I am trying to add some a CSS header to a task form.
I have created a formatter and an UI macro.
I can get the CSS to work ....
<?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 class="jumbotron">
<h2>This CSS formatter</h2>
</div>
</j:jelly>
My question is for the next part is for the next part I want to display CSS formatted data but cant find info for how to put the syntax together
I assume its something like this but I who knows? Can I display variables ? Is there any resources I Cna look at of how I can add some CSS flare to change forms
<?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 class="jumbotron">
<script>
var chgNumber = g_form.getElement('number');
var chgtype = g_form.getElement('type');
</script>
//not sure w
<h2>The change numebr is ... $chgNumber </h2>
<h2>The change numebr is ... $chgtype </h2>
</div>
</j:jelly>
Solved! Go to Solution.
- Labels:
-
User Interface (UI)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-27-2018 08:28 AM
Hi,
I think g_form wouldn't work on ui macro.
Follow below approach;
<h2 id ="message1"></h2>
<h2 id ="message2"></h2>
Write an onload client script.
document.getElementById("message1").innerHTML = g_form.getElement('number');
document.getElementById("message2").innerHTML = g_form.getElement('type');

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-27-2018 06:37 AM
Hi,
Use below :
<h2>The change numebr is ... ${chgNumber} </h2>
<h2>The change numebr is ... ${chgtype}</h2>
you need to use ${variable}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-27-2018 08:03 AM
Hi Thanks for the reply!
instead of dispalying the var name as seen above $chgtype is now showing blank as seen below so I assume that var chgNumber = g_form.getElement('number'); is not storing anything to var .. any thoughts why?
is var chgNumber = g_form.getElement('number'); a correct way to read a value from a form?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-27-2018 08:28 AM
Hi,
I think g_form wouldn't work on ui macro.
Follow below approach;
<h2 id ="message1"></h2>
<h2 id ="message2"></h2>
Write an onload client script.
document.getElementById("message1").innerHTML = g_form.getElement('number');
document.getElementById("message2").innerHTML = g_form.getElement('type');
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2018 05:48 AM
Thanks! just needed to make one change - Add .value at the end of each statement