Expand my Community achievements bar.

Radio button selections need to stay visible

Avatar

Level 4

I have a form in which I use radio buttons to offer people choices and based on their choice fields appear or don't appear.  When I save the form and go back to it later the selection I made is there, but the fields that are supposed to appear with the selection are not there until I click the radio button again. Then the fields appear and everything in them.  I really need the fields to stay visible once they have been chosen.  How do I do that?  I've been playing around with different places to have the coding, but intially I don't want the extra fields so I'm trying to start with them hidden and I think that's part of my problem.  I'm attaching a sample of the fields.  Additional fields are supposed to appear when the Yes button is selected.

Thanks!

https://acrobat.com/#d=-9Jjm-pgsWBOdMAgVvzB3w

4 Replies

Avatar

Level 7

You have scripts on the initialize event to hide the fields. Instead, hide the fields using the object pallet presence property setting. Also, place the scripts that reveal the fields on the change event of the exclusion group--not the yes/no radio buttons themselves (i.e. forprofitselect). Example

if(this.rawValue  == "1"){

     subawardagency.presence = "visible";

else

     subawardagency.presence = "hidden";

}

Good luck,

Stephen

Avatar

Level 4

I tried what you suggested, but I'm not having any luck with it.  I must not be understanding what you're saying.  I took the scripts off of the initialize event and tried to hide them on the object pallette. I didn't really know what to choose though because I was unable to make them reappear with my other scripting.  Also, I would make them disappear off of my design view which isn't helpful if I need to edit them in some manner.  So what do I need to select, as I've reserached them a bit none of them really seem like what I want?  My options are:

Visible

Visible (Screen Only)

Visible (Print Only)

Invisible

Hidden (Exclude from Layout)

Inactive (Exclude from Form Processing)

One-sided Printing Only

Two-sided Printing Only

Also, you mentioned putting the script on the "change event of the exclusion group."  Maybe I'm putting it on the wrong place, I've got the exclusion group, not the individual yes and no, but is the change event "enter" or "exit" or "click"?  Also, I've tried putting it those and I'm getting an error message with "else" saying it's an illegal use of a reserved word.  I have the script in Java.

I would appreciate the additional help.  Thanks!

Avatar

Level 4

I think I solved my issue on where to put the script.  I looked again and saw a choice of "change" so I've moved my script there, but all my other issues are still there.  Including the issue with else.

Avatar

Level 7

Sorry--script error--my bad! Try:

if(this.rawValue  == "1"){

     subawardagency.presence = "visible";

}

else {

     subawardagency.presence = "hidden";

}

Stephen