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

Form Calculation Help. Multiply two fields plus delivery

New Here ,
Jun 26, 2024 Jun 26, 2024

Copy link to clipboard

Copied

HI, I've been asked to create an interactive quote form.

 

The product is rental, so I need to show "the price per week", multiplied by the "number of weeks" the customer needs it for, "plus £250 delivery". 

 

The number of weeks required must be a minimum of 6 weeks too.

 

What do i need to put in the total field calculation please.?

thank you

 

Screenshot 2024-06-26 at 10.54.31.png

TOPICS
Create PDFs , Edit and convert PDFs , How to , PDF , PDF forms

Views

162

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 , Jun 26, 2024 Jun 26, 2024

As the custom calculation script for "Pricing per Week" enter the following:

 

var v1 = Number(this.getField("Rental Number of weeks required").valueAsString);
var v2 = Number(this.getField("Pricing").valueAsString);
if (v1==0 || v2==0) event.value = "";
else event.value = (v1*v2)+250;

 

As the custom validation script for "Rental Number of weeks required" enter the following:

 

if (event.value && Number(event.value)<6) {
	app.alert("Minimum 6 weeks rental.");
	event.rc = false;
}

Votes

Translate

Translate
Community Expert ,
Jun 26, 2024 Jun 26, 2024

Copy link to clipboard

Copied

What are the actual names of the fields involved?

The latter is not related to the total calculation. You will need to use a custom validation script on that field to do it.

 

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 ,
Jun 26, 2024 Jun 26, 2024

Copy link to clipboard

Copied

Hi, thanks for the reply.

 

Number of weeks required - "Rental Number of weeks required"

Pricing  - "Pricing per Week"

Amount - "Running total 

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 ,
Jun 26, 2024 Jun 26, 2024

Copy link to clipboard

Copied

LATEST

As the custom calculation script for "Pricing per Week" enter the following:

 

var v1 = Number(this.getField("Rental Number of weeks required").valueAsString);
var v2 = Number(this.getField("Pricing").valueAsString);
if (v1==0 || v2==0) event.value = "";
else event.value = (v1*v2)+250;

 

As the custom validation script for "Rental Number of weeks required" enter the following:

 

if (event.value && Number(event.value)<6) {
	app.alert("Minimum 6 weeks rental.");
	event.rc = false;
}

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