Skip to main content
Known Participant
November 6, 2023
Question

Show and hide three text fields based on drop down

  • November 6, 2023
  • 2 replies
  • 1154 views

I have a "Dropdown2" with different product names and I have added prices in their export values. Some export values have same prices. I need to show and hide three text fields based on dropdown names and their export values. Three text fields are named as Huawei, Fenecon and BYD HVS. Here are few options 

Huawei 5,0 - 5400
Huawei 15,0 - 9900

Fenecon S8,8 - 8900
Fenecon S15,4 - 11800
Fenecon S17,6 - 12700
BYD HVS 5,1 - 8900
BYD HVS 7,7 - 9900

5400 9900 ... these are export values. So when I select any option from Huawei then only huawei field should be visible and other two hidden. So same like for Fenecon and BYD HVS. 

This topic has been closed for replies.

2 replies

Bernd Alheit
Community Expert
Community Expert
November 6, 2023

Check the selected entry.

Nesa Nurani
Community Expert
Community Expert
November 6, 2023

Use validate script of dropdown to get choices instead of export values.

if(event.value == "Huawei 5,0" || event.value == "Huawei 15,0"){

//script to show/hide fields

}

...etc

Known Participant
November 6, 2023

It does not work with export values. Please check attached file. 

try67
Community Expert
Community Expert
November 6, 2023

Then change the values in the code to the export values...