These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Form question - how to

plmiller
Registered: Jul 26 2006
Posts: 7
Answered

Ok let's try again:
I have designed a form (imported from excel spreadsheet).

My question is, can I place a text box within the form that would reflect the choice elsewhere in the form? - for example, I have a field called APO in the main form. Below that form is a 3 column list with a radio button next to each choice (I have programmed button so that only 1 item may be chosen).
What I am looking to do is have the APO box reflect the choice selected choice selected in the list by the person filling out the form. Is that possible?
I am using Acrobat 9.0.0 standard and I guess would be considered an sort of an intermediate user.

My Product Information:
Acrobat Standard 9.0, Windows
StevenD
Registered: Oct 6 2006
Posts: 368
Here is my solution.

I added a text field and three radio buttons. the values for the radio button respectively are "One", "Two", "Three".

var myVal = getField("Rad.MyChoice");
if(myVal.value === "Off")
{
this.event.value = "";
}
else
{
this.event.value = myVal.value;
}

I added this script to my text field in a custom calculation script that I want the value of the selected radio button to appear.

StevenD

plmiller
Registered: Jul 26 2006
Posts: 7
I assume I should copy that exactly. On my radio buttons I noticed they are all checked. How do I remove them. Do I need to rename them all (Igave each a seperate value so there would be no duplicates), they are marked required ( should that be changed?) or do something else?
StevenD
Registered: Oct 6 2006
Posts: 368
You would change the "Rad.MyChoice" radio button group to the name you are using. I don't know if there is a better way to do this and I would hope if there is that someone with more scripting skills would jump and tell.

As I was testing this out I went Forms > Clear Form to reset the buttons to thier default state which is nothing checked. This will of course reset all fields in the document.I don't think you need to change the required setting.

We are talking about radio buttons and not check boxes right? You may know allready that you can make check boxes behave similar to radio buttons in that only one can be checked. One of the main differences is that any of the check boxes in the group can be unchecked so none are checked and once you click on a radio button in a group at least one of them will be checked unless you reset or clear the form. To make the check boxes work like radio buttons you simply give all of the check boxes the same name but each one has a unique export value.

Not seeing how your radio buttons are set up I can only guess that each radio is not in it's own group. In other words radio buttons in a group need to have the same name.

Does this help?

StevenD

plmiller
Registered: Jul 26 2006
Posts: 7
They are radio buttons, but I chose a check style. The names of the bottons are APO (which each having it's own value). I am not doing something right. I can click more than one option in the list and it doesn't read in the text box. and it doesn't register in my text box. I wrote the codes like this: var APO=getField("Rad.APO");
if(APO.value === "Off")
{
this.event.value ="";
}
else
{
this.event.value = APO.value;}

If I sent you the form could you tell?
StevenD
Registered: Oct 6 2006
Posts: 368
I could try. Can you post the form somewhere?

StevenD

plmiller
Registered: Jul 26 2006
Posts: 7
not sure where to post it other than emailing it to you. Is there someplace within the forum to do that? It doesn't have anything sensitive it.
daka630
Expert
Registered: Mar 1 2007
Posts: 1420
You could use acrobat.com
Create an Adobe ID (free). You provide an email address and your password.
Look over the asociated help information re: types of shared links.

Upload file to acrobat.com then use the "share" feature.
The link gets put to your clipboard.
Past it into a text file for placement into a post here.


Be well...

Be well...