Skip to main content
Participating Frequently
May 9, 2023
Question

multi-page form with checkboxes and text fields?

  • May 9, 2023
  • 2 replies
  • 2279 views

Very new to forms and Java. I have a multi-page form that I use alot. each page has the same heights, lets call them 6', 7', 8'. Most pages have different values for each height, pages 1, 5,6, and 9 might have the same values. I would like to use a checkbox so if I check the 6' height all pages are checked 6' but the textboxes on each page has the value for that page. Is this possible? this is over my head and any help would be appreciated. 

This topic has been closed for replies.

2 replies

Sonny AR
Inspiring
May 18, 2023

Why are you using javascript to perform this task? You can indeed achieve the desired behavior by making copies of checkboxes and assigning unique export values to each checkbox from checkbox properties > Option Tab>  Export Value

Participating Frequently
May 18, 2023

Like I said before I'm new to forms and I don't know a better way.

Here is an example, the above script is in a text box. On page1 each of these check boxes I need the value from column A to go to the text box. If I name the check boxes the same with the same export value, I will have 5 checkboxes on the same page even though columns D,E,and F are different.  On page2 the Size colunm is the same but column A is different. So if I check the 6'6" box on page1, pages 2-12 are all checked and their text fields corresponds to column A on their page. Is there a way for me to have only one check box marked at a time? Is there a better way to do this?

 

Nesa Nurani
Community Expert
Community Expert
May 18, 2023

Then don't give checkboxes the same name.

Sorry, I'm not entirely sure what you try to achieve.

Can you share your file with description of what you try to do?

Participating Frequently
May 18, 2023

I named all of my boxes on each page the same name. I wrote a script to get the different values for each page. my proplem now is I want only one box checked at a time. So if the 6' box is selected and I need to change it to 7' the 6' is unselected. 

here is my script.

if (this.getField("SS60").valueAsString !="Off") event.value ="7 9/32";
else if (this.getField("SS66").valueAsString !="Off") event.value ="7 9/32";
else if (this.getField("SS70").valueAsString !="Off") event.value ="7 9/32";
else if (this.getField("SS76").valueAsString !="Off") event.value ="13 9/32";
else if (this.getField("SS80").valueAsString !="Off") event.value ="19 9/32";
else if (this.getField("SS86").valueAsString !="Off") event.value ="25 9/32";
else if (this.getField("SS90").valueAsString !="Off") event.value ="31 9/32";
else if (this.getField("SS96").valueAsString !="Off") event.value ="37 9/32";
else if (this.getField("SS10").valueAsString !="Off") event.value ="43 9/32";
else event.value = "";

Nesa Nurani
Community Expert
Community Expert
May 18, 2023

To make checkboxes mutually exclusive, give them same name but different export value.

Participating Frequently
May 18, 2023

The problem I had before is page2 has checkboxes named the same as page1 but the values are different so the checkmark wouldn't follow to the next page or if you look at SS60, SS66, and SS70 they all have the same value and I would end up with 3 checkmarks. I did change the text field name on each page and the script is slightly different for each page.