We have a container where the user can compose a page consisting of different elements: headline, subheadline, paragraph, etc.. Now, I want to add a separator element. The problem: A separator has no input. Thus, neither items of type text, checkbox, etc. make sense.What item type should I use for a separator? Or: How do I create an empty item?
What do you mean by "Seaparator Element"?
<container name="content" combination="or" min="0" max="unbounded" default="1"> <item name="headline_2"> <text size="80"></text> </item> <item name="headline_3"> <text size="80"></text> </item> <item name="paragraph"> <textarea cols="80" rows="10" wrap="virtual"> </textarea> </item> <item name="separator"> <description>a horizontal rule</description>??? </item></container>
As kshitiz told you that you should use container as seperator for different group of items.
For example a "". See the code below for an example datacapture config. So, my question remains: How do I best create an element with no input?
I still don't understand why you want to do that.
What would be the alternative?
Alternative I have already explained in my earlier post. USE CONTAINERS
<item name="separator"> <label></label> <text><default><hr/></default></text> <readonly/> </item>
Why you need a seprator/line in form entry?
<item name="hr" pathid="hr"> <label><<x>HR></label> <radio> <option value="1" label="" selected="t" /> </radio> </item>
Look at the code to understand how the DCR is structured. The container is a replicant for building a page. I don't need a separator in the form entry (which would be weird) but in the *generated page*. Anyone?
That makes more sense - but wasn't what you stated (or what we inferred from what you stated).You're now talking PT code - are you using XML, XML/Perl, or XSLT for your PTs? Can you post the relevant portion of your PT where you're wanting to insert the horizontal rule - and explain what you've tried to do that didn't work?
Actually Adam, I believe he is simply looking for a way for the user to indicate he wants an hr tag in the tpl. It sounds like he has an or container with several options like p tag, h1 tag, h2 tag, table tag, ul tag, img tag, a tag, hr tag, etc. Where the user can select any of these components in any order. He then compiles these tags in the order specified in his tpl. His issue is that becuase there is no input needed for an hr tag, he could not think of a way to allow the user to indicate they want an hr tag. It is because of this that I suggested he simply have a radio item with a single option selected by default that has some value that his tpl can use to know to add an hr tag when selected.Please correct me if I am wrong, but I don't believe I am based on the content of his posts.~Jeff
Actually Adam, I believe he is simply looking for a way for the user to indicate he wants an hr tag in the tpl.