CalcBuilder Forum

Add Section field upward

User moon_1542 2014-03-27 23:29:21


I have a budgeting calculator live and active, but how do i get the "add" button to include a new section field at the top instead of the button. when visitors start adding 10+ line items they will have to scroll all the time going down, then up to add a new section the down again to enter data.

or better still how to get the "add" button be placed at the bottom

secondly if "calculate" button is pressed, when result is at the top, the page do not auto scroll up to display the result.

Please kindly assist

Moonsoft support 2014-03-28 09:25:21

new sections are always added at the bottom, you could surround your sections area inside a div with fixed height in order button is always visible and users can scroll up and down at section area, or, modify the source code to include new section always as the first child, this is done here:


replacing line 67:



Please note this is a code modification, we don't know if there will be unwanted effects about reordering when saving/recovering user data.

About 'going to the results', the calculator doesn't know where they are (forms are free, results can be placed at different positions, and inline results can be even at the input form). You can change the results section to show inside a popup so they will always show at the center of the window, or build a script able to travel to an internal link of your results sections, you should place it at the tab 'execute after calculate execution', in order to ensure result section is already enabled.

hope this helps, regards

User moon_1542 2014-03-28 17:38:24

Thanks very much. i made the changes and it worked like magic. all reports etc are all functional with no concerns


Perfect for small code changes or to correct any bug at your site

Buy now!

Create dynamic calculators

Buy now!