aesch777
Forum Replies Created
-
Forum: Plugins
In reply to: [Calculated Fields Form] If statements, Multiple Conditions, && and ||??
Okay thanks @codepeople for your support for the long thread. Have a good new years!
All the best,
Forum: Plugins
In reply to: [Calculated Fields Form] If statements, Multiple Conditions, && and ||Okay thank you I appreciate it. Tips and instructions help a lot ??
I am hesitant on entering two fieldnames (fieldname 2 and 3) that have to be in between two numbers.
The conditions I want are:
-fieldname49 is married or fieldname > 1
-fieldname 50 is No
-fieldname2 is between 25,000 – 50,000
-fieldname3 is between 5000 -10000
-fieldname57 is aresult: 6200
Code so far:
if((fieldname49 == ‘Married’ || fieldname16 > 1) && fieldname50 == ‘No’ && (fieldname2 < 25000 && fieldname2 <= 5000) && (5000 <= fieldname3 && fieldname3 < 10000) && fieldname57 == ‘a’ ) return 7200;
Forum: Plugins
In reply to: [Calculated Fields Form] If statements, Multiple Conditions, && and ||What about in between numbers. For example, I want to make a condition of fieldname3 in between 3000 – 5999?
Would both (fieldname3 >= 3000 && fieldname3 <= 5999)
and (3000 <= fieldname3 && 5999 >= fieldname3)
work?And, if I put all these conditions together in addition to fieldname57 == ‘a’
What is wrong with my code here?
if((fieldname49 == ‘Single’ || fieldname16 < 2) && fieldname50 == ‘No’ && fieldname2 < 15000 && (3000 <= fieldname3 && 6000 > fieldname3 ) && fieldname57 == ‘a’ ) return 8400;
Forum: Plugins
In reply to: [Calculated Fields Form] If statements, Multiple Conditions, && and ||I have to add another condition. fieldname57 will have choice values: a, b, c
if everything is the same, and fieldname == a
My code looks like this:
if((fieldname10 == ‘Single’ || fieldname5 < 2) && fieldname11 == ‘No’ && (35000 < fieldname7 || 6000 < fieldname8) && fieldname57 == a) return 11000;
I do not quite understand the placement of the parentheses still. Is there a guide or more examples?
Thanks for your help!
Thanks that has helped me.
When using radio buttons, Is there a way the user can fill in information on one of the choices, and the calculation will show up in the blanks?
Say the user checks this option:
___I will begin paying my tuition off next month on the 1st of (enter month and year here) in (enter # here) monthly payments of (“result here”) of months from now until August 1, 2018. My payments are due on the 1st of each month starting next month on (Select Date)
The user enters (month and year), and (select date) for information that will be submitted on the form.
-And enters (# of months) to calculate answer, which will be seen in “result here”
From the example you have given me, can I still add HTML Content: through the radio buttons’ choice texts? I am still unsure on how to do this.
Thanks for your time!
All the best,
Forum: Plugins
In reply to: [Calculated Fields Form] If statements, Multiple Conditions, && and ||Hi! Thank you so much for the help.
I will keep the suggestion to use radio buttons in mind.
I am still stuck on a couple conditions with Multiple Or’s / And’s
Condition:
If one person household OR single, with NO finance plan, AND annual income is more than $35,000, OR monetary assets is More than $6000 assets = value is 11000
Code So Far:
if((fieldname10 == 'Single' || fieldname5 < 2) && fieldname11 == 'No' && fieldname7 > 35000 || fieldname8 > 6000) return 11000;
[Moderator note: code fixed. Please wrap code in the backtick character or use the code button.]
Thanks,
- This reply was modified 6 years, 11 months ago by bdbrown.
Forum: Plugins
In reply to: [Calculated Fields Form] If statements, Multiple Conditions, && and ||Hi Yes I did include that:
Link: https://sinplydeals.com/tuition-calculator/(function(){ if((fieldname10 == ‘Single’ || fieldname5 < 2) && fieldname11 == ‘No’ && fieldname7 < 15000 && fieldname8 < 3000) return 7000; if((fieldname10 == ‘Single’ || fieldname5 < 2) && fieldname11 == ‘Yes’ && fieldname7 < 15000 && fieldname8 < 3000) return 8400; if((fieldname10 == ‘Single’ || fieldname5 < 2) && fieldname11 == ‘No’ && fieldname7 >= 15000 && fieldname8 <=35000 && fieldname3 < 6000) return 9000; if((fieldname10 == ‘Single’ || fieldname5 < 2) && fieldname11 == ‘Yes’ && fieldname7 >= 15000 && fieldname8 <=35000 && fieldname3 < 6000) return 10800; if((fieldname10 == ‘Single’ || fieldname5 < 2) && fieldname11 == ‘No’ && fieldname7 < 35000 && fieldname8 < 3000) return 11000; if((fieldname10 == ‘Single’ || fieldname5 < 2) && fieldname11 == ‘Yes’ && fieldname7 < 35000 && fieldname8 < 3000) return 13200; if((fieldname10 == ‘Married’ || fieldname5 > 1) && fieldname11 == ‘No’ && fieldname7 < 25000 && fieldname8 < 5000) return 7000; if((fieldname10 == ‘Married’ || fieldname5 > 1) && fieldname11 == ‘Yes’ && fieldname7 < 25000 && fieldname8 < 5000) return 8400; if((fieldname10 == ‘Married’ || fieldname5 > 1) && fieldname11 == ‘No’ && fieldname7 >= 25000 && fieldname7 <= 50000 && fieldname8 < 5000) return 9000; if((fieldname10 == ‘Married’ || fieldname5 > 1) && fieldname11 == ‘Yes’ && fieldname7 >= 25000 && fieldname7 <= 50000 && fieldname8 < 10000) return 10800; if((fieldname10 == ‘Married’ || fieldname5 > 1) && fieldname11 == ‘No’ && fieldname7 > 50000 && fieldname8 > 10000) return 11000; if((fieldname10 == ‘Married’ || fieldname5 > 1) && fieldname11 == ‘Yes’ && fieldname7 > 50000 && fieldname8 > 10000) return 13200; })()
[Moderator note: code fixed. Please wrap code in the backtick character or use the code button.]
- This reply was modified 6 years, 11 months ago by bdbrown.
Forum: Plugins
In reply to: [Calculated Fields Form] If statements, Multiple Conditions, && and ||Hi I changed it to this, however it is still not working.
if((fieldname15 == ‘Single’ ||fieldname16 < 2) && fieldname20 == ‘No’ && fieldname2 < 15000 && fieldname3 < 3000) return 7000; if((fieldname15 == ‘Single’ || fieldname16 < 2) && fieldname20 == ‘Yes’ && fieldname2 < 15000 && fieldname3 < 3000) return 8400; if((fieldname15 == ‘Single’ || fieldname16 < 2) && fieldname20 == ‘No’ && fieldname2 >= 15000 && fieldname2 <=35000 && fieldname3 < 6000) return 9000; if((fieldname15 == ‘Single’ || fieldname16 < 2) && fieldname20 == ‘Yes’ && fieldname2 >= 15000 && fieldname2 <=35000 && fieldname3 < 6000) return 10800; if((fieldname15 == ‘Single’ || fieldname16 < 2) && fieldname20 == ‘No’ && fieldname2 < 35000 && fieldname3 < 3000) return 11000; if((fieldname15 == ‘Single’ || fieldname16 < 2) && fieldname20 == ‘Yes’ && fieldname2 < 35000 && fieldname3 < 3000) return 13200; if((fieldname15 == ‘Married’ || fieldname16 > 1) && fieldname20 ==’Yes’ fieldname20 == No && fieldname2 < 25000 && fieldname3 < 5000) return 7000; if((fieldname15 == ‘Married’ || fieldname16 > 1) && fieldname20 == ‘Yes’ && fieldname2 < 25000 && fieldname3 < 5000) return 8400; if((fieldname15 == ‘Married’ || fieldname16 > 1) && fieldname20 == ‘No’ && fieldname2 >= 25000 && fieldname2 <= 50000 && fieldname3 < 5000) return 9000; if((fieldname15 == ‘Married’ || fieldname16 > 1) && fieldname20 == ‘Yes’ && fieldname2 >= 25000 && fieldname2 <= 50000 && fieldname3 < 10000) return 10800; if((fieldname15 == ‘Married’ || fieldname16 > 1) && fieldname20 == ‘No’ && fieldname2 > 50000 && fieldname3 > 10000) return 11000; if((fieldname15 == ‘Married’ || fieldname16 > 1) && fieldname20 == ‘Yes’ && fieldname2 > 50000 && fieldname3 > 10000) return 13200;
[Moderator note: code fixed. Please wrap code in the backtick character or use the code button.]
- This reply was modified 6 years, 11 months ago by bdbrown.
Forum: Plugins
In reply to: [Calculated Fields Form] If statements, Multiple Conditions, && and ||Also, for reference from what I was working on:
For one person household…
Level 1: Annual Income is Less Than $15,000 (and less than $3,000 assets)
without financing = $7,000
with financing $8,400Level 2: Annual Income: $15,000-$35,000 (and less than $6,000 assets)
without financing = $9,000
with financing $10,800Level 3: More than $35,000 (or more than $6,000 assets)
without financing = $11,000
with financing $13,200For Married or two or more person household…
Level 1: Annual Income is Less Than $25,000 (and less than $5,000 assets)
without financing = $7,000
with financing $8,400Level 2: Annual Income: $25,000-$50,000 (and less than $10,000 assets)
without financing = $9,000
with financing $10,800Level 3: More than $50,000 (or more than $10,000 assets)
without financing = $11,000
with financing $13,200