Form Functions

This is used to access functions such as lookups, and is normally attached to a button.

The main lookups available are as follows:

JS=SPLGetAddressData(document.getElementById('article_form_user_xx').value)

This uses an external postcode lookup to find the address details matching a given postcode. This does not lookup the house name or number which must be entered by the user.

JS=SPLGetFullAddressData(document.getElementById('article_form_user_xx').value)

This also uses an external postcode lookup to find the address details matching a given postcode. However this version provides a pick-list of valid addresses for the user to choose from, ensuring that only valid addresses can be entered.

The address fields provided should be the same as above, with the following addition:

JS=calc_monthly_repayment(MONTHLY_INTEREST)

This calculates the monthly repayments based on the MONTHLY_INTEREST value set (eg JS=calc_monthly_repayment(3) will use a monthly rate of 3%).

The following library fields must be set:

IF LIB=loan_repayment_frequency is set (MONTHLY, FORTNIGHTLY, WEEKLY) this will be used - otherwise the default will be MONTHLY.

The calculation is based on the values of loan_term and loan_amount entered by the user, and the result is shown in calc_monthly_repayment (which should therefore be set to READONLY).