Expand my Community achievements bar.

SOLVED

Text box with multiple text entry’s derived from multiple radio buttons.

Avatar

Level 2

Once again I find myself asking for some help.

I have a form with a lot of questions. Answers are derived by radio buttons which in turn are displayed in text boxes associated with each group of radio buttons. This part I don’t have a problem with.

What I would like to happen is that all these individual answers also get displayed in a separate “Total” text box so as to give an overview of the results of the form.


The problem I am having is that I am only getting 1 answer in my “Total” text box and this then gets replaced when the next RB is selected on the following question/answer selection.

Any help will be appreciated.

Raffe.

1 Accepted Solution

Avatar

Correct answer by
Level 9

Hi Raffe,

If you want to display all the selections made in the RadioButtons in the Toal field you can directly all those answers as a string concatenation like this.

Total.rawValue = Radiobutton1.rawValue + "some delimeter like comma, hypen if you want" + radiobutto2.rawValue + So on...

Keep in mind that The total field should of TextField not NumericField.

Thanks,

Bibhu.

View solution in original post

10 Replies

Avatar

Correct answer by
Level 9

Hi Raffe,

If you want to display all the selections made in the RadioButtons in the Toal field you can directly all those answers as a string concatenation like this.

Total.rawValue = Radiobutton1.rawValue + "some delimeter like comma, hypen if you want" + radiobutto2.rawValue + So on...

Keep in mind that The total field should of TextField not NumericField.

Thanks,

Bibhu.

Avatar

Level 2

Hi Bibhu.

Thanks for your help with this but I must be missing something as I can't seem to get this to work. Any other sugestions.

Raffe.

Avatar

Level 9

Hi Raffe,

It is not possible to comment on what exactly happens in your form without seeing the form. Could you please explain what you have done and where you are finding it diccicult?

Thanks,

Bibhu.

Avatar

Level 2

Hi Bibhu

Have put script that you suggested in to "total" text field. Have tried it under click and change but still not getting my pre determined answers from (radio buttons) are not coming through into my "total" text field giving an overview o answers.

Can do for single) but would like to have all answers to come through into 1 text field.

Raffe.

Sent via my BlackBerry from Vodacom - let your email find you!

Avatar

Level 9

Hi Raffe,

I guess there might be some referencing error. While putting that script in change/click event of RadioButtons press control and put the mouse cursor on the total field. You can see the som expression in the script editor. If that does not workout try xf.resolveNode method and put that som expression inside. If that does not workout I need to see your form.

Thanks,

Bibhu.

Avatar

Level 5

Raffe,

You need to concatenate all the radio button's result's into total result.

on calculate event of the total you need to keep below script and language should be JavaScript.

this.rawValue = "Result 1 **  "+ Result1.rawValue +"  ** Result 2 **  "+Result2.rawValue;

I have created sample document you can refer the document in the below link.

https://workspaces.acrobat.com/?d=en80jZsIZWaGtwKcDgNUJg

Thanks

Vjay

Avatar

Level 2

Thanks Vjay for this but it doesn’t seem to be working my side. I get a null return from my text field.

Avatar

Level 2

Hi Bibhu.

Have tried what you suggested but no luck.

Could I take you up on your offer and send you my form so you could give me some pointers,

Raffe.

Avatar

Level 5

Raffe, Can you share your file so that we can look into it or Mail me muchukotavijay@gmail.com.

Thanks

Vjay