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)
Setting default values
amaresh
Hi thank in advance,
Can anyone plz tell me how to set the default value for a text field
Find more posts tagged with
Comments
jbonifaci
<text>
<default>Default Value</default>
</text>
<textarea>
<default>Default Value></default>
</textarea>
~Jeff
Migrateduser
I have trid this,but it did not works
Adam Stoller
What version of TS (including SP level)?
Show us your DCT code
Tell us exactly what procedural steps you follow when testing this DCT.
Tell us (or show via screenshots) exactly what *is* as well as *is not* happening.
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
Migrateduser
I got it.
it's my fault!
but I think this method is too ackward.
plantronics
What did you do to get this to work? I have the following DCT code:
<item name="rowpercent" pathid="
@rowpercent"
rowcontinue="f">
<label>Column Width (percentage)</label>
<description>The width of this column as a percentage of overall content area width</description>
<text required="f" size="3">
<default>45</default>
</text>
</item>
yet it does not set any default value. This is on TS 6.5 Solaris.
cliffhanger
I see your
pathid="
@rowpercent"
. Try making it
pathid="rowpercent"
, same as your item name.
plantronics
Im just doing it via FormAPI now. But in the above case how would I have rowpercent be an attribute of the parent element (in an XML style DCR).
cliffhanger
I am not sure I understand your question fully. Why would you want rowpercent to be an
attribute
of the parent element ? rowpercent is a child element of its parent, and that relationship should not get affected if you have your path id same as the item name.
Surely FormAPI is one way of doing it, but you could give <default/> a chance, would save some coding that way.
plantronics
Id like the resulting DCR to read something like this:
<contentGroup rowpercent="45">
<!--child nodes would go here-->
</contentGroup>
The rowpercent item is defined as an attribute of its container, which is contentGroup. To do this it needs to have the @ symbol prefixed to the pathid.
If I changed the pathid to "rowpercent", the resulting XML would be:
<contentGroup>
<rowpercent>45</rowpercent>
</contentGroup>
Which I dont want. Maybe if I change the name to match pathid, rather than change pathid to match name?