CalcBuilder Forum

Add Section field upward

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

Hi,

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.

www.financeeducation.co.za


Please kindly assist

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

Hi,
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:


joomla\modules\mod_calcbuilder\assets\js\calcbuilder.js

replacing line 67:

CB('#sec_ext_'+idsection).append(wrapper);

for
CB('#sec_ext_'+idsection).prepend(wrapper);

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

...
Support/development 40 hours

With the peace of mind of having a professional team at your service (20% discount)

Buy now!
...
CalcBuilder

Create dynamic calculators

Buy now!