Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    #16
    Just noticed that this vAlign property isn't working entirely how I want it to. If you run the sample test case below, I have "password2" which has vAlign set to top - note that it is never set - I always see vAlign set to "middle" using firebug. I do the same thing with my "testTitle" statictextitem and it works fine. As a reminder, vAlign was set to top so that when the validate button is clicked, the labels would stay at the top and not shift. Please let me know if I am doing something wrong or am missing something. Thanks

    Code:
    isc.DynamicForm.create({
        ID: "boundForm",numCols:3,
        dataSource: "users",colWidths: [100,200],
        useAllDataSourceFields: true,
    showInlineErrors:true,showErrorText:true,errorOrientation:"bottom",showErrorStyle:true,showErrorIcons:false,wrapItemTitles:true,titleAlign:"left",
        fields: [
            {type:"header", defaultValue:"Registration Form"},
            {name: "password"},
            {name: "password2", title: "Password Again", type: "password", required: true, vAlign:"top",
             length: 20, validators: [{
                 type: "matchesField",
                 otherField: "password",
                 errorMessage: "Passwords do not match"
             }]
            },
    {name: "testTitle", defaultValue:"Testme", type:"staticText",vAlign: "top", colSpan:1,showTitle:false,startRow:true},
    {name: "date1",showTitle:false, type:"date",colSpan:1},        
    {name:"date2", showTitle:false,type:"date", colSpan:1},
    {name: "acceptTerms", title: "I accept the terms of use.", type: "checkbox", required: true, width: "150"},
            {name: "validateBtn", title: "Validate", type: "button", click: "form.validate()"}
        ],
        values : {
            firstName: "Bob",
            email: "bob@.com",
            password: "sekrit",
            password2: "fatfinger"
        }
    });

    Comment


      #17
      Not sure what you're expecting here but vAlign is working.
      Here's a simple test case that demonstrates this clearly:
      Code:
      isc.DynamicForm.create({
          ID: "boundForm",numCols:6, width:800,
          
          fields: [
              {name:"tallTextArea", editorType:"TextAreaItem", height:100, value:"This is 100px tall"},
              {name: "foo", editorType:"StaticTextItem",  vAlign:"top", value:"This is a test value"},
              {name: "password2", title: "Password Again", type: "password", required: true, vAlign:"top",
               length: 20, validators: [{
                   type: "matchesField",
                   otherField: "password",
                   errorMessage: "Passwords do not match"
               }]
              }],
          values : {
              firstName: "Bob",
              email: "bob@.com",
              password: "sekrit",
              password2: "fatfinger"
          }
      });

      Comment


        #18
        You're right, it works - I was looking at the title to be aligned to the top, not the field itself.

        Comment

        Working...
        X