Auto-fill field based on pick-list field and current date field

Auto-fill field based on pick-list field and current date field

On a form I have a pick-list field called Proposal Owner which contains values like this:

JD - John Doe

On the same form I have a date field called Current Date whose date format is MM/dd/yy. There is also the following (on load) script governing the field:

//Lines 1-5: Current Date field scripting
// Assign the value of zoho.currentdate to the date field
input.Current_Date = zoho.currentdate;
// Disable the date field from being edited by the user
disable Current_Date;

On that same form I also have a single-line field called Proposal Number.

What I want to accomplish is an auto-fill of the Proposal Number, based on the Proposal Owner and Current Date fields, plus a sequential number representing how many quotes the owner has created for that day.

Example: If John Doe is creating his fifth quote on January 17, 2013, then the Proposal Number field should auto-fill as such:

JD011705-13

Here's what I have so far:

input.Proposal_Number = (input.Proposal_Owner_and_Current_Date).subString(0,4);