Hi,I am using TeamSite 6.1 SP1 on Solaris.I have a field called length which I need to hide from the users. The value of this field is being used for some validation.I am using the following function for the same:------------------------------------------------------------------------- function init() { var itemToHide = IWDatacapture.getItem("/pageTitleIntro/length"); if (itemToHide) itemToHide.setVisible(false); } IWEventRegistry.addFormHandler("onFormInit", init);------------------------------------------------------------------------During new form entry, or when DCR is opened in edit mode (by clicking on the edit link next to the DCR), this field remain hidden. If we click on the DCT directly, the is displayed.Is there a way to execute a method similar to init() and hide the length item in preview mode.regards,Shekhar
Is there other way??
There can be a way but i dont know if it solves your problem.You can make this item invisible in the datacapture.cfg only instead of making it invisible using FormAPI....I hope it helps ...Regds,Sandy
. If javascript is doing this functionality, why are they not allowing it in view mode...
If FormAPI is working in Edit mode, why is it not working or not available in view mode?...
Is there any update in recent versions about this feature?
It is the same in 6.7.X and IMO that's how it should be. Your branch-related Label tuning can (should?) be done using DCT inline(s), that'll work in both modes
FormAPI is essentially Java Script, evaluated by local Browser. .... Since the Form can not be saved that would have been a bug.
The javascript should work for both modes(veiw and edit) in a browser. Are you saying this is a bug? Whatever may the mode, we should have control to show or hide an item. In normal javascript, we could hide a div/span/item.
Can we able to do this functionality by inline? Here is the requirement :From database I will get the Line value 1, 2 or 3. and field value 1(checked) or 0(unchecked).For 1, Display a check box with text : Line 1 - If field value is 1, make it readonly(so user should not change)For 2, Display a check box with text : Line 2 - If field value is 1, make it readonly(so user should not change)For 3, don't display anythingOnce user submits DD, the user selection or default value should go to the database table. We got everything in Edit mode, but we are not able to hide in view mode. Here is our solution : We are using two checkboxes because of the different text to display and getting the database value by using inline and keeping in a hidden variable1(making hidden in init()). In init(), we are checking the value of hidden1 and making active/inactive the checkboxes 1 and 2. When user submits, we are updating the hidden2(default is empty) based on the Checkbox 1 or 2. The hidden2 is the DD variable for the database. So it is working fine. So this is combination of inline and javascript(FormAPI).Any one have idea how to handle this whole thing by using inline? Any example please.. Thanks for your help.