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

Dropdown item price with java script

New Here ,
Nov 18, 2022 Nov 18, 2022

my issue is that , i have 1 dropdown name Items with 3 items (fruits) i want when someone pick any friut in dropdown the price auto come in price section, i do this java script in price section it's not showing any error but not showing the price too , i have tried many times but stuck in this problem pls guide me where im doing mistake 

 

var Item = this.getfeild("Items").value;
switch(Item) {

 

case "Apple":
event.value = "100";
break;

case "Banana":
event.value = "150";
break;

case "Graps":
event.value = "200";
break;

case "Orange":
event.value = "250";
break;

}

TOPICS
Crash or freeze , JavaScript , PDF forms
2.3K
Translate
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
1 ACCEPTED SOLUTION
Community Expert ,
Nov 20, 2022 Nov 20, 2022

Change getfeild to getField like this:

var Item = this.getField("Items").value;

View solution in original post

Translate
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 ,
Nov 18, 2022 Nov 18, 2022

There are errors in your code. Check the JS Console.

Translate
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 ,
Nov 19, 2022 Nov 19, 2022

brother what is JS Console kindly tell me the error in easy way

 

Translate
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 ,
Nov 19, 2022 Nov 19, 2022

This is wrong: "getfeild"

Translate
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 ,
Nov 19, 2022 Nov 19, 2022

"brother what is JS Console?"

 

Capture_2211191109.pngexpand image


Acrobate du PDF, InDesigner et Photoshoptographe
Translate
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 ,
Nov 19, 2022 Nov 19, 2022

Thanks i open these options , brother i still cant fix issue , i dont know the java script please correct my script where is problem 

 

var Item = this.getfeild("Items").value;
switch(Item) {

 

case "Apple":
event.value = "100";
break;

case "Banana":
event.value = "150";
break;

case "Graps":
event.value = "200";
break;

case "Orange":
event.value = "250";
break;

}

Translate
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 ,
Nov 20, 2022 Nov 20, 2022

Change getfeild to getField like this:

var Item = this.getField("Items").value;

Translate
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 ,
Nov 20, 2022 Nov 20, 2022
LATEST

Thank you so much 

Translate
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