I need help with FormCalc code in a calculation field.
I have the following user-entry fields set up in a form:
4 different price fields named: price_one, price_two, price_three, price_four
a photo size field named: enlarge_size, where a choice can be made from a drop down list of four different sizes: 5 x 7, 8 x 10, 11 x 14, 12 x 18
a quantity field named: quant
I then have a calculated field named: ext_cost, where I am attempting to use the following code:
if (enlarge_size = [5 x 7]) then
(quant * price_one)
elseif (enlarge_size = [8 x 10]) then
(quant * price_two)
elseif (enlarge_size = [11 x 14]) then
(quant * price_three)
elseif (enlarge_size = [12 x 18]) then
(quant * price_four)
endif
When I try to PDF preview it, I get an error message telling me that I have a syntax error near token '=' on line 1 column 18.
I understand the line 1, column 18 refers to the script editor window, but I can't figure out how to get my calculation field to work properly.
I am new to scripting, and so am only able to wrap my mind around FormCalc barely. So if anyone could point out what I am doing wrong with my code I would really appreciate it.
If it would help, I could email my form to you. Just let me know your email address.
Thanks for your help.
Curtis