Hi all, I apparently broke the rules by posting this in someone else's thread (it was related, in my defense, and I was sort of directing my post to user Kyle123 who seemed to know what he was talking about and be willing to help) so I'm making my own thread here... My bad for not reading the forum rules. I found the thread through Google and never actually went to the main page of the forum. <DOH!>
Primary Question:
How hard would it be to convert a spreadsheet like the one I'm attaching into an html/javascript based calculator? It's a calculator for determining the price of a custom product based on what attributes are chosen. Ideally I'd like for each attribute to be a checkbox with values 0 or 1, (or True/False or Yes/No--these would all work, just require a tweak to the formula) but if the person has to actually change a 0 into a 1 using the keyboard in a text box that would be ok, too. Each ingredient that is >0 (or =TRUE or =YES, etc.) changes the adjacent cell from the default 0.00 to an amount in cents with a formula like this: =IF( B5>0,0.05, 0 ) ... and then that column is totaled at the bottom and added to the base price of $2.95; something like this: =SUM(C4:C48)+2.95
Is this a difficult thing to do? I have no knowledge of javascript--just html, css, and I can manipulate php but not actually write code...I mean I could write the input form in a matter of minutes, but I could never write the code that calculated the formulas.
Note: the site is all done in php, so if it's easier/better/whatever to use php in this conversion, that's a-okay. PHP, javascript, magical incantations, rubber chicken sacrifices... whatever it takes.
I'm attaching 1) the excel spreadsheet that actually calculates the price, and 2) a sample html file that shows how the form would look on a web page, but has no functionality whatsoever (remove ".txt" from the end of the filename). (If they go poof, they're also here: .xlsx file, .html file)
If it's a monster of a thing, don't put yourself through it, obviously, but if it's easy to do, or better still if there is a pattern that you could show me so I could do it myself... that would be wonderful!
Much Less Important Secondary Question:
The other thing is a VERY simple one, I am assuming: a text entry box that someone enters a number in, and then either a box next to it changes according to the formula, or they push a submit button and the number shows up or whatever, but the formula is just =A1*10 (assuming the spreadsheet had A1 as the entry for the number) and yes, I am well aware that it's sad that some people need a calculator to multiply things by 10, but it's true. Ideally in a perfect world there would just be two side-by-side text boxes, the left one where they enter the number, and the right one which would update on the fly with the calculated number (and not be editable by clicking into it--that's important) without having to push buttons or reload pages... like this
Anyway, thank you very much for just taking the time to read this post. If you can help, I love you and you're my new best friend. Actually if you can help, I may be able to hook you up with a free homemade lip balm, if you're interested 
PS. I know there is very expensive specialized software that will do this for me, but a) I can't really afford it especially for how few times I'd use it and b) I've tried the free trial and can't even get it to work.
Bookmarks