on 07-10-2009 11:23 AM
Hi,
In my form there are two fields ( Dropdown and another is radio button group). The condition is if the dropdown has no value selected, the radio button group shouldn't appear on the form. And the moment some value gets selected from dropdown, the radio button group should appear on the form. I guess some java scripting is required and I tried with this:
if (CarGrade.selectedIndex.value = 0)
{
ISR_RadioButtonListGroup.ISR_RadioButtonList.ISR_RadioButton.presence = "invisible";
}
else
{
ISR_RadioButtonListGroup.ISR_RadioButtonList.ISR_RadioButton.presence = "visible";
}
But its not working, plz help.
I changed it to Form Calc too but
No, still it doesn't work.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Himanshu,
Have u enabled the Dynamic property of ur Interavtive Form through doModifyView method of the view containing the Form.
try placing this code in the doModifyView method of the view containing the Form:
IWDInteractiveForm IForm = (IWDInteractiveForm)view.getElement(" Name of ur Interactive Form as in Outline View");
IForm.setDynamicPDF(true);
Hope this will help...!!
Thanks
Amita
Hi Madhu,
Still its not working.
What I have done now
in the initialize event of radio button group I have put
ISR_RadioButtonListGroup.ISR_RadioButtonList.access = "readOnly";
and in change event of dropdown I have put
if (CarGrade.selectedIndex.value = 0)
{
ISR_RadioButtonListGroup.ISR_RadioButtonList.access = "readOnly";
}
else
{
ISR_RadioButtonListGroup.ISR_RadioButtonList.access = "open";
}
This piece of code is working perfectly fine and also when I put
ISR_RadioButtonListGroup.ISR_RadioButtonList.access = "invisible"; in the initialize event of radio button group
The Radio buttons are getting hidden out.
But the following piece of code suggested by you is not working:
var a = this.boundItem(xfa.event.newText);
if ( a == null || a == " " )
{
ISR_RadioButtonListGroup.ISR_RadioButtonList.ISR_RadioButton.presence = "invisible";
}
else
{
ISR_RadioButtonListGroup.ISR_RadioButtonList.ISR_RadioButton.presence = "visible";
}
Plz help
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
place the below script in the Change Event of the DropDownList and Script Language as JavaScript.
var a = this.boundItem(xfa.event.newText);
if ( a == null || a == " " )
{
ISR_RadioButtonListGroup.presence = "invisible";
}
else
{
ISR_RadioButtonListGroup.presence = "visible";
}
Thanks & Regards,
Madhu.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Thanks a lot for suggestions.
But unfortunately the dynamic visibility is not working with the java script code as suggested.
Is there any other way or any other idea.
Plz help
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I put the above code behind the CLICK event of my dropdown box and also at the DOCREADY event.
I put it at the DOCREADY event to default the fields to invisible.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
this should be relatively simple to do....
i'm using formcalc in this instance to check if a field's input is populated with certain values - if so, then make a field and its caption visible.
if (( PROJ_CLASSIFICATION.rawValue eq "Discretionary") or
( PROJ_CLASSIFICATION.rawValue eq "Mandatory"))
then
BENEFIT2.presence = "visible"
ben2txt.presence = "visible"
else
BENEFIT2.presence = "invisible"
ben2txt.presence = "invisible"
endif
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.