| | Stumble It! | Add to Mixx! | | diigo it | | Slashdot |

Thursday, November 19, 2009

formWorks 0.7a


A recent email exchange has led me to update the formWorks code and include a couple new functions:
  • insertHeader(n, header)
    • This feature will let you insert section headers by adding a single line to the proper section in runMods(). For example, the code below should create the section headers we're trying to set up for your page:
function runMods() { ... } else if (location.href.match(/NewForm.aspx/)) {
... twoCols() code here...

insertHeader(19, "Counties");
insertHeader(21, "Provider Types"); } ... }
  • fixWidth()
    • Setting the variables at the top of this function to your desired length in pixel or percentage measurements will resize the elements of the form to your taste. To execute this function, simply call the function from anywhere and it will update the CSS on the page. Variables are:
      1. formWidth - this will change the width of the form as a whole
      2. labelWidth - this will change the width of the labels (list column titles) on the left of the form
      3. contentWidth - this will change the width of the text and table cell on the right of the form
      4. inputWidth - this will change the width of the input objects on the form
Also, I removed the "areYouAdmin()" function as it was causing more problems than it was solving.

0 comments: