SQL-Ledger Homepage

SQL-Ledger User Forum

Forum index page

Log in | Register

Back to the board
Thread view  Mix view  Order


Mission BC Canada,
24.10.2014, 14:56

Pre-fill form boxes (General)


I want to pre-fill the 'From" and 'To" boxes of the "Compare To" section of my Income Statement form.

I want to always have the YTD totals in the second column every time I run a monthly Income statement. At least by default.

I'm tired of typing in 01-01-2014 and 31-12-2014 every single time I run this report!

So I've got rp.pl open and I've been able to set other defaults in the past like having the Month radio button checked by default but I'm not sure about the syntax of pre-filling a box.

I've found a line that says "input name=comparefromdate size=11 class=date..."

Can I pre-define this at the beginning of the file so that '01-01-2014' or preferrably '01-01-$currentyear' is pre-filled into the box but I am able to overwrite it?

I'm a fair programmer but not very experienced with perl.




Mission BC Canada,
24.10.2014, 17:09

@ JayArr

Pre-fill form boxes

OK, I figured it out...

find that line that contains "input name=comparefromdate size=11 class=date"... it's around line 286 in my file.

and add "value="01-01-2014""

to get:

input name=comparefromdate size=11 class=date value="01-01-2014"...

Then do it again for comparetodate.

Now when I coose income statement the compare from and to are pre-filled and I get my second colum with YTD figures by default.

I'll have to edit the file every Jnauary but that's not a big deal to me.

HTH somebody else.


Back to the board
Thread view  Mix view  Order
1007 Postings in 335 Threads, 364 registered users, 93 users online (0 registered, 93 guests)
SQL-Ledger User Forum | Admin contact
powered by my little forum