Embed Calculoid in Rapidweaver


(Kjetil) #1

The genius Calculoid gives me clear instructions on how to embed the code, but I dont gett it. where do I put the folowing strings

"

" https://github.com/calculoidapp/calculoidapp.github.io/wiki/Embeding-of-Calculoid%27s-calculators

Please help me!

Kjetil of Norway


(Peter Danckwerts) #2

You just need to put it in an html stack. The first line should really go in the page header (go to the page inspector, select the 3rd tab along and then ‘Header’). You’ll get an error message saying ‘HTTP origin must be provided.’ but that should go away when it is on yuor server.


(Kjetil) #3

Thanks for helping Peter, but it didnt work.
Here is the page I put it on, i didnt get the error massage.

http://www.gsalsa.no/page3/page24/test.html


(Peter Danckwerts) #4

Safari/s error console shows an error message ;App Already Bootstrapped with this Element ’

There is some information about it here, but I don’t really understand it:
https://docs.angularjs.org/error/ng/btstrpd?p0=<div%20ng-app%3D"calculoid"%20ng-controller%3D"CalculoidMainCtrl"%20ng-init%3D"init({calcId:3449,apiKey:‘55bc6cec6d4cb’})"%20ng-include%3D"load()"%20class%3D"ng-scope">


(Willem) #5

Did you get this resolved? I am also seeing if I can embed a calculator and it gives men the error:
HTTP origin must be provided.
??


(Robert Ziebol 🖖🏼) #6

Not sure about the error, but Joe found a solution if it is displayed incorrectly (it happens on many themes as you can see here: http://www.zeebedesigns.com/calc-test/)

To correct it in Foundation (fix for Foundation coming soon), use this code in the page inspector:

.postfix,.prefix{display:none}

Once the fix is released, you will not need the above code on the page.


(Willem) #7

Thank you so much for finding the issue with formatting, especially since it affected Foundation.

As far as “seeing” the calculator; It will not show up until you publish on a normal web server/your domain.
So publish your site somewhere to see the final result :smile:

Also… there are features (like email the results) that are not showing when you create a free calculator.
Lastly… You need to “activate” the calculator and make it public to be able to use it/view it.

I wrote the dimensional freight calculator myself and found it to be a nice tool to do some very complex (nested formula’s etc.) stuff.


(Willem) #8

@zeebe, just noticed that the removal of “prefix” and “postfix”, is actually removing 2 datapoints/dynamic fields that are optional in Calculoid. I was actually using the “prefix” field and that data is naturally as a result not showing anymore.

It does expose the fact that the “fields” should be “in line” with the data input/output field and NOT above and underneath. They also should be “collapsed” if not used. (no data present). Somehow the theme settings are causing these datapoints to become exposed at full width and above and below the main field.