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

I need to Calculate the Federal Poverty Level Percentage

New Here ,
Jan 29, 2025 Jan 29, 2025

The two imput boxes are monthly income and # of people. I need to muliply the monthly income by 12 to get the annual. Then i need to take the (number of people - 1) * 5500+15650. Then it needs to divide the annual number/the second equation. Then it needs to be turned into a percentage.

 

TOPICS
How to , PDF forms
1.0K
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
2 ACCEPTED SOLUTIONS
Community Expert ,
Jan 29, 2025 Jan 29, 2025

Format the field where the solution will appear as a percentage, then enter the following custom calculation script in it:

 

 

var income=this.getField("monthly income").value;
var numpeople=this.getField("# of people").value;
if(!income || !numpeople)
{event.value=""}
else
{
event.value=income*12/((numpeople-1)*5500+156540);
}

 

 

 

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 ,
Jan 30, 2025 Jan 30, 2025

Your field name is monthy income (no L) but the script says monthly income.  Ether change the script to say monthy or change the field name to say monthly.

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 ,
Jan 29, 2025 Jan 29, 2025

Format the field where the solution will appear as a percentage, then enter the following custom calculation script in it:

 

 

var income=this.getField("monthly income").value;
var numpeople=this.getField("# of people").value;
if(!income || !numpeople)
{event.value=""}
else
{
event.value=income*12/((numpeople-1)*5500+156540);
}

 

 

 

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 ,
Jan 29, 2025 Jan 29, 2025

it is giving me syntaxerror: unterminated string literal

2: at line 3

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 ,
Jan 29, 2025 Jan 29, 2025

Typo.  Script corrected.

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 ,
Jan 29, 2025 Jan 29, 2025

It went through but when i type numbers in the monthly income and # of people it doesn't do anything.

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 ,
Jan 29, 2025 Jan 29, 2025

Can you upload your form?

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 ,
Jan 30, 2025 Jan 30, 2025

Here is the form I am trying to make work.

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 ,
Jan 30, 2025 Jan 30, 2025

Your field name is monthy income (no L) but the script says monthly income.  Ether change the script to say monthy or change the field name to say monthly.

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 ,
Jan 30, 2025 Jan 30, 2025
LATEST

Thank you, of course it was because I didn't spell it right.

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 ,
Jan 30, 2025 Jan 30, 2025

Look at the Javascript console (ctrl-j).

Use the correct field names.

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 ,
Jan 29, 2025 Jan 29, 2025

Are "monthly income" and "# of people" your actual field names?

If not, you need to change them in script to your actual field names.

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