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

How to display only the options the user selects in Adobe DC Form.

New Here ,
Jan 01, 2021 Jan 01, 2021

Copy link to clipboard

Copied

I have an Adobe DC form in which users can select up to 47 options for self-improvement activities.  On the final page, I would like to provide a list (summary, if you will) of the options they selected. I know how to get a field to duplicate on another page. I also know how to hide a field that has no data in it. 

 

The trouble with this method is that it doesn't make my list conscise.  For example, if they select otions "1", "10" and "25" then I would like to offer them a list that displays those options one after another without a lot of white space in between.  

Thanks in advance for any help that is out there.

Cindy

TOPICS
PDF forms

Views

245

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 ,
Jan 01, 2021 Jan 01, 2021

Copy link to clipboard

Copied

I'm assuming you have Acrobat, even though you posted in the Reader forum...

What are the names of the fields you want to summarize? And what kind of fields are they (text, check-boxes, radio-buttons, etc.)?

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
New Here ,
Jan 02, 2021 Jan 02, 2021

Copy link to clipboard

Copied

Hi TR67. My fields are check boxes with corresponding text fields that automatically populate once the check box is ticked.  Say, for example, someone ticks the box next to a line of text that says "repair my credit."   If they select that option, two other fields then fill in with data detailing the next steps they should take. 

Ditto for the other 46 options. The client sees all 47 options but only the "next step" fields fill in once the option is ticked. 

 

I would like to creat a final page for this form which will capture just the options they ticked, along with the coresponding next steps.  This would mean the final page ignores unselected options, as opposed to simply not showing them. Here's what I would like my last page to display:

 

CK1 "Repair my credit"  TextField1a "Do this"  TextFeld1b "Then do that"
CK5 "Open a savings account" TextField5a "do this" TextField5b "then do that."

 

Here's how it will look if I proceed using my knowlege: 
CK1 "Repair my credit"  TextField1a "Do this"  TextFeld1b "Then do that"

blank for CK2

Bank for CK3
Blank for CH4

CK5 "Open a savings account" TextField5a "do this" TextField5b "then do that."

 

I'm not even sure what the name of this technique is.  I've looked through the Adobe Javascript manual but not knowing what to call it leaves me looking for a needle in a haystack.

Regards,

Cindy



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
LEGEND ,
Jan 02, 2021 Jan 02, 2021

Copy link to clipboard

Copied

You are assuming that "ignore" would some how close up the form fields. Nothing will do that. There is no name for it, and no such technique.

 

Adobe used to have a different kind of form called XFA, that was laid out dynamically. Never caught on and is now dead. So we are stuck with form fields being in fixed locations, unless you really want to do a lot of work. But if you are new to forms, this is probably a step too far. Refer to my earlier reply for a different approach you might consider.

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
New Here ,
Jan 02, 2021 Jan 02, 2021

Copy link to clipboard

Copied

Thanks.  I will try to see if I can learn this approach. I've seen something that asks the script to loop through all the answers and then do something else depending upon what data is found.  Would that sort of thing work for my purposes, do you think?

 

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 ,
Jan 02, 2021 Jan 02, 2021

Copy link to clipboard

Copied

LATEST

Yes, you can certainly create a sort of "summary" field that will only display the selected options.

The code to do it would be something like this (used the custom calculation script of a multi-line text field):

 

var msg = "";

if (this.getField("CK1").valueAsString!="Off") {
	msg+="Repair my credit\nSteps:-" + this.getField("TextField1a").valueAsString + "\n-" + this.getField("TextField1b").valueAsString + "\n\n";
}

// etc.

if (this.getField("CK5").valueAsString!="Off") {
	msg+="Open a savings account\nSteps:-" + this.getField("TextField5a").valueAsString + "\n-" + this.getField("TextField5b").valueAsString + "\n\n";
}

event.value = msg;

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
LEGEND ,
Jan 01, 2021 Jan 01, 2021

Copy link to clipboard

Copied

Hiding a field with no data in it is comparatively easy, but closing up the gap is extremely difficult-to-impossible. You could try making a multiline variable with the summary and display that in a single field.

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