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

Gestion de grille de prix et quantité via le formulaire intéractif

New Here ,
May 29, 2024 May 29, 2024

Copy link to clipboard

Copied

Bonjour, 

 

Je n'arrive pas à lier une liste déroulante de quantité et une liste de prix pré-établie, pour que les clients sélectionnent une quantité et ça affiche le bon prix, puis calculer le total sur le document. En gros est-ce qu'on peux lier deux listes.

Je ne sais pas si c'est possible et malheureusement je ne peux vous fournir le doc en question. 

 

Bonne journée !

TOPICS
PDF forms

Views

299

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

correct answers 1 Correct answer

Community Expert , May 29, 2024 May 29, 2024

Yes, that makes more sense... You can simply apply the price as the export value of each item in your drop-down and then use this code as the calculation script of the price field:

 

event.value = this.getField("Quantity").value;

 

Make sure to set the option of the drop-down field to commit the selected value immediately (under Properties, Options tab), so that the text field will update as soon as you make a selection in the drop-down.

Votes

Translate

Translate
Community Expert ,
May 29, 2024 May 29, 2024

Copy link to clipboard

Copied

Yes, it's possible. As the custom validation script of the first field enter something like this (edit the field-name and values as needed, of course):

 

if (event.value=="Product 1") this.getField("PriceList").setItems(["", "1.22", "2.44", "5"]);
else if (event.value=="Product 2") this.getField("PriceList").setItems(["", "3.22", "12.44", "15"]); // etc.
else this.getField("PriceList").clearItems();

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 ,
May 29, 2024 May 29, 2024

Copy link to clipboard

Copied

I don't know why it don't take it.  it stays on no validation.

I think i was misleading on linking two lists, now i know that i must define a value(price) to a field via the lists(quantity).

 

But why it stays on no validation 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
Community Expert ,
May 29, 2024 May 29, 2024

Copy link to clipboard

Copied

Yes, that makes more sense... You can simply apply the price as the export value of each item in your drop-down and then use this code as the calculation script of the price field:

 

event.value = this.getField("Quantity").value;

 

Make sure to set the option of the drop-down field to commit the selected value immediately (under Properties, Options tab), so that the text field will update as soon as you make a selection in the drop-down.

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 ,
May 29, 2024 May 29, 2024

Copy link to clipboard

Copied

LATEST

All fine, Thank you

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