...

View Full Version : Populating form fields from divs



wjrasmussen
11-05-2012, 11:00 PM
There is a situation which feels like a design pattern would be a good fit.

The application will have 40 or more different forms that users will fill out each with some shared fields and with other unique fields.

There are going to be two other major divs for form processing purposes: organization, {donor,vendor}

The organization div will have 3 buttons:
one for populating the form with the organization's license number and contact information.
one for populating the form with the organization's license number but using the accounting firms contact information.
one for populating the form with the organization's license number but using a lawyers contact information.

The donor or vendor div will also have a populating button which will grab various license numbers and fields and put them into the form.


So with 40+ forms with such similar requirements, this seems like a great place for a pattern. Also, thinking in terms of minimizing the amount of work when changes occur in the future. Any recommendations on this?

Old Pedant
11-05-2012, 11:34 PM
"grab"? From whence will the button "grab" those "various licence numbers and fields"???

wjrasmussen
11-06-2012, 12:13 AM
"grab"? From whence will the button "grab" those "various licence numbers and fields"???

from within fields within a div.

Old Pedant
11-06-2012, 12:40 AM
<shrug>So yes, you could write a common function to do this. The more the various "contact information" fields are the same in the different cases the more universal the function could be.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum