Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Radio Button Default Value
Vid
When I try creating a new form entry , the options that have "selected = "t" " in a radio button item, are selected by default. However, when i try to edit the form, the DCR does not have any value selected by default. How can i achieve this?
The First screen shot is for a new form entry. The second while editing an Alreay Exisitng DCR
That is Radio button shown in the screen is selected to off by default. But this is not selected in case of editing an already existing DCR
Any suggestions?
Thanks for your time
Find more posts tagged with
Comments
Frederik
Strange. What TS version?
How and when was this "already existing dcr" created? Was the
selected="t"
(or even the whole radio select item) added to the DCT after this DCR was created? In that case, it seems like (fairly) normal behaviour to me. The default really only applies to new DCR.
One *might* (sometimes) want it to also apply to fields that are added to the DCT, when re-opening an older DCR. Guess that's not implemented.
Vid
TS version 6.1
Yes the whole radio button Item was added to the DCT after the DCR was created and hence the default value is not set when the old DCR is reopened. . Any way around this ?
thanks for your time
RajatChopra
can you post your datacapture.cfg in here please??
-R
Frederik
You could manually or automatically edit all existing DCRs to add the relevant bit of XML at the right location, typically something like
[HTML]
default_value_per_your_liking
[/HTML]
We've done that (*) a few times, using XSLT - just with a shell script that discovers all files (DCRs) in a given directory. There's a command line executable available that can help you: $IWHOME/bin/XalanTransform
(*) well, it was really for a more complicated restructuring of the DCT fields. If this is just for a few DCRs, then you'll be faster of instructing your users, or editing the DCR files manually.
Vid
I have attached the relevant portions of datacapture.cfg here.
thanks for your suggestions
Pawan
Hi Vid,
Looking at your initial post, do you require the radio button to be selected for the default value in the edit mode even if the user has selected different value at the time of creating new ?
As you have added the radio part later you can try this by explicitly setting the value of the radio button as desired.
HTH