Skip to main content
angier13990773
Participant
March 28, 2018
Pregunta

We have a radio button form we want to utilize with customers --error on Line 7 -Suggestions on how to fix?

  • March 28, 2018
  • 1 respuesta
  • 496 visualizaciones

if('Boiling Water Canner'=="Yes") {

// selected - show radio buttons

this.getField('Boiling Water Pack').display = display.visible; // show radio button

} else if {

// deselected show hide the radio buttons and reset the field

this.getField('Group 1”).display = display.hidden; // hide radio button}

if('Pressure Canner'="Yes") else {

// selected - show radio buttons

this.getField('Pressure Canner Gauge').display = display.visible; // show radio button

} else if {

// deselected show hide the radio buttons and reset the field

this.getField('Group 1”).display = display.hidden; // hide radio button

this.resetForm([‘Group 1’]); // clear radio button

}

if(Dehydration=="Yes") else if {

// deselected show hide the radio buttons and reset the field

this.getField('Group 1”).display = display.hidden; // hide radio button}

Este tema ha sido cerrado para respuestas.

1 respuesta

try67
Community Expert
Community Expert
March 28, 2018

The error message is probably because you used inconsistent quotes in this line:

this.getField('Group 1”).display = display.hidden;

I would recommend sticking with one type of quotes, either double or single, but they must always be straight. No "curly" quotes allowed!

Also, there's an error already in line 1. That's not how you access the value of a field.

It needs to be:

if (this.getField("Boiling Water Canner").valueAsString=="Yes") {

Same goes for all other instances where you tried to do it.

angier13990773
Participant
March 28, 2018

Great -- I have updated to the following:

if(this.getField("Boiling Water Canner").valueAsString=="Yes") {

// selected - show radio buttons

this.getField('Boiling Water Pack').display = display.visible; // show radio button

} else

// deselected show hide the radio buttons and reset the field

this.getField('Group 1').display = display.hidden; // hide radio button}

if(this.getField("Pressure Canner").valueAsString=="Yes"){

// selected - show radio buttons

this.getField('Pressure Canner Gauge').display = display.visible; // show radio button

} else

// deselected show hide the radio buttons and reset the field

this.getField('Group 1').display = display.hidden; // hide radio button}

} else

// deselected show hide the radio buttons and reset the field

this.getField('Group 1').display = display.hidden; // hide radio button}

if(this.getField("Dehydration").valueAsString=="Yes") {

// selected - show radio buttons

Now an error on line 14 ?

try67
Community Expert
Community Expert
March 28, 2018

What is the exact text of the error message? It usually provides a pretty good idea of what the problem is.