Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Checkboxes in Metadata
lizn
Does anyone know how to format checkboxes in a MD? I'd like to have these checkboxes in rows of 3 instead of them all just a scrolling list, the format needs to be easier to read. I've tried adding rowcontinue and colspan to a couple different tags, but am having no luck. If anyone has an idea, please let me know.
<item name="CFSTATE">
<label>State</label>
<description>Select State.</description>
<database searchable="f" deploy-column="f"/>
<checkbox>
<option label="ALL" value="all/" selected="t"/>
<option label="Alabama" value="al/"/>
<option label="Alaska" value="ak/"/>
<option label="Arizona" value="az/"/>
<option label="Arkansas" value="ar/"/>
.
.
.
<option label="Wyoming" value="wy/"/>
</checkbox>
</item>
Find more posts tagged with
Comments
Adam Stoller
MD? You mean metadata capture template?
Which version of TeamSite? (the UI for metadata capture changes significantly between TS6 and previous versions of TS - and it's likely to change again sometime [early?] next year)
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
lizn
Yes the metadata capture template and I'm using Teamsite 6.1
Adam Stoller
It's a hack - but you could do this:
<checkbox>
<option label="ALL" value="all/" selected="t"/>
<option label="Alabama" value="al/"/>
<option label="Alaska
<br/>
" value="ak/"/>
<option label="Arizona" value="az/"/>
<option label="Arkansas" value="ar/"/>
</checkbox>
I just tested this on my 6.1 server and it seemed to work (mind you, the checkboxes don't line up nicely, but I can force a line break where I want one)
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
lizn
That does work. I tried manually adding to add some space to work on getting the columns to align, but that doesn't work. Is there something else I can use to make this look still a little cleaner.
Adam Stoller
I'm not sure if there's a way to do that - you could try something like &nbsp; which *might* work (but I'd be surprised). You could also try something *really* hackish and embed table formatting for everything but that seems like a ton of work and a pain to maintain.
I'd suggest filing a feature request with IWOV to provide for the ability for *more* control over the formatting of checkbox (and radio) elements - something which could "do the right thing" - maybe something like:
<checkbox format="table:columns=3:border=1">
<option label="ALL" value="all/" selected="t"/>
<option label="Alabama" value="al/"/>
<option label="Alaska" value="ak/"/>
<option label="Arizona" value="az/"/>
<option label="Arkansas" value="ar/"/>
</checkbox>
and have it result in something that looked like:
[ ]
ALL
[ ]
Alabama
[ ]
Alaska
[ ]
Arizona
[ ]
Arkansas
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
lizn
To our surprise &nbsp; does work, but this is going to be a major pain to get it formatted into columns, but if there's not an easier way, I guess at this time, I don't have a better option. Thanks for all your help.
lizn
I have my checkboxes aligned correctly by using a repeated spacer pixel. Now I'm on to another problem. Is there any way to get onclick functions added into the Metadata??? Below is what I want to do, but nothing I try seems to work. I don't think I can wrap a form around my check boxes or get any actions to work. Any suggestions would really help.
Thanks
function checkAll(field)
{
for (i = 1; i < field.length; i++)
field
.checked = false ;
}
function uncheckAll(field)
{
field[0].checked = false ;
}
<checkbox>
<option name="role" label="ALL <img src='/iw-cc/formspub/images/spacer.gif' width='70' height='0'/>" value="all/" selected="t" onclick="checkAll(role);"/>
<option name="role" value="claims/" label="Claims <img src='/iw-cc/formspub/images/spacer.gif' width='47' height='0'/>" onclick="uncheckAll(role);"/>
<option name="role" value="employee/" label="Employee <br/>"/>
<option name="role" value="iar/" label="IAR <img src='/iw-cc/formspub/images/spacer.gif' width='71' height='0'/>"/>
<option name="role" value="prin/" label="Principal <img src='/iw-cc/formspub/images/spacer.gif' width='36' height='0'/>"/>
<option name="role" value="rr/" label="Registered Reps <br/>"/>
<option name="role" value="sales/" label="Sales"/>
</checkbox>
Adam Stoller
Metadata capture forms do NOT [yet] support FormAPI / javascript.
I believe that's coming in 6.5 or 6.7 (or 7.0?) some time next year.
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
gzevin
I heard that the API will be combined in 7.0
Greg Zevin, Ph.D. Comp. Sc.
Independent Interwoven Consultant/Architect
Sydney, AU
lizn
I've mistaken, i'm not doing this in the metadate, but the DCT, so I know I should be able to use FormsAPI.