• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Dialog box, feedback of 2 values for radio buttons selection

Community Expert ,
Mar 05, 2021 Mar 05, 2021

Copy link to clipboard

Copied

In a dialog box script, is it possible to get the feedback of 2 values in a same function?

Such as below, I only get the "resp" answer. I did several tests without any success...

Doing it with 2 functions is working fine, but I'm pretty sur it is possible with a single function.

Thanks

myQuestion: function (results) {
	for (var i=0; i<=2; i++) {
		if (results["Rad"+i]) {
			switch (i) {
				case 0:
					var resp=1;
					var otherResp=4;
					break;
				case 1:
					var resp=2;
					var otherResp=5;
					break;
				case 2:
					var resp=3;
					var otherResp=6;
			}
		}
	};
	return resp;
},

 

TOPICS
How to , JavaScript , PDF forms

Views

292

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 2 Correct answers

Community Expert , Mar 05, 2021 Mar 05, 2021

You can return an array that contains both values, like this:

return [resp, otherResp];

Votes

Translate

Translate
Community Expert , Mar 05, 2021 Mar 05, 2021

You can put the values in an array and return the array.

Votes

Translate

Translate
Community Expert ,
Mar 05, 2021 Mar 05, 2021

Copy link to clipboard

Copied

You can return an array that contains both values, like this:

return [resp, otherResp];

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 05, 2021 Mar 05, 2021

Copy link to clipboard

Copied

LATEST

Thank you, that's what I'm just thinking...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 05, 2021 Mar 05, 2021

Copy link to clipboard

Copied

You can put the values in an array and return the array.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines