The calculator component in PlanX uses Math.js notation. You can find a useful list of syntax here.
- You will need to add a ‘default’ value for any passport field you reference, to tell the calculator what type of value to expect. Usually this is likely to be 0 or 1 or, in some cases a relevant minimum value that makes sense for the particular thing you’re using it for.
- Always add help text and a hyperlinked legislation source to every calculation. At the moment these are not shown anywhere, but they will be, and could be. This will also help future editors check your work, as well as users.
- Feel free to use the internal notes field to leave notes for future editors.