Announcement

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

    How can I create hovers for the labels in a DynamicForm?

    I have to make the text that hovers on my field values appear as well when the user hovers the label of that field, can you give some insight on that?

    #2
    You can use the the titleHoverHTML() method to create and customize hover text for the user to see when they hover over the form item title.

    Regards
    Isomorphic Software

    Comment


      #3
      I am trying to simulate it with the following code in the link:http://www.smartclient.com/#formLayoutTitles

      but the titleHoverHTML() event doesn't seem to be fired when I hover the title, what am I doing wrong in this case?

      Code:
      isc.DynamicForm.create({
          ID: "exampleForm",
          width: 250,
          fields: [
              {name: "username",
               title: "Username",
               type: "text",
               required: true,
               defaultValue: "bob",
               titleHoverHTML: function(item, form) { return "test"; }
              },
              {name: "email",
               title: "Email",
               required: true,
               type: "text",
               defaultValue: "bob@isomorphic.com"
              },
              {name: "password",
               title: "Password",
               required: true,
               type: "password"
              },
              {name: "password2",
               required: true,
               title: "Password again",
               type: "password"
              }
          ]
      });
      
      isc.Button.create({
          left: 300,
          title: "Swap titles",
          click: function () {
              exampleForm.setTitleOrientation(exampleForm.titleOrientation == "top" ? "left" : "top");
          }
      });

      Comment


        #4
        We actually had a problem with titleHoverHTML and related events somewhat recently (and it shows up in the live samples on the website).
        Your code should work fine in the latest nightly build. If it doesn't please let us know (and let us know exactly what build you're testing with)

        Thanks
        Isomorphic Software

        Comment


          #5
          Here I could not make it work, but I am using version 9.0.1.9.14, that could be the case then.

          Comment


            #6
            I updated the version to 9.1.4.3.14, but still it seems that the function is not being called when I hover the title, here goes the code I am using:

            Code:
            isc.DynamicForm.create({
            			ID: "form",
            		  	autoFocus: false,
            			dataSource: someData,
            			itemHoverAlign:"left",
            			itemHoverHeight:100,
            			itemHoverWidth:200,
            			overflow: "auto",
            			emptyMessage:"Empty",
                                    fields: [
            {
            name:"field1", 
            canEdit:false,              
            title:"Text", 
            type:"staticText",
            shouldSaveValue:false, 
            prompt:"test", 
            titleHoverHTML: function(item, form) {  
            return "testTitle"; 
            }}]
            });
            which exactly is the version in which the hover was fixed? Or is there any other problem?

            Comment


              #7
              Looks like the fix went in on April 3 2014 so you'll need a more recent nightly build than the one you're using.

              Comment

              Working...
              X