Announcement

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

    Problem with canEdit: false, readOnlyDisplay: "static" DynamicForm width

    Hi Isomorphic,

    please see this testcase (v11.1p_2018-09-14):

    Code:
    isc.DynamicForm.create({
        ID: "exampleForm",
        width: 250,
        titleWidth:"100",
        fields: [
            {name: "username",
             title: "Username",
             type: "text",
             width:"*",
             required: true,
             defaultValue: "bob"
            },
            {name: "email",
             title: "Email",
             required: true,
             width:"*",
             type: "text",
             defaultValue: "idontthinksuchalongemailmakessense@isomorphic.com"
            }
        ]
    });
    
    isc.DynamicForm.create({
        ID: "exampleForm2", disabled: true,
        width: 250,
        titleWidth:"100",
        fields: [
            {name: "username",
             title: "Username",
             type: "text",
             width:"*",
             required: true,
             defaultValue: "bob"
            },
            {name: "email",
             title: "Email",
             required: true,
             width:"*",
             type: "text",
             defaultValue: "idontthinksuchalongemailmakessense@isomorphic.com"
            }
        ]
    });
    
    isc.DynamicForm.create({
        ID: "exampleForm3", canEdit: false,
        width: 250,
        titleWidth:"100",
        fields: [
            {name: "username",
             title: "Username",
             type: "text",
             width:"*",
             required: true,
             defaultValue: "bob"
            },
            {name: "email",
             title: "Email",
             required: true,
             width:"*",
             type: "text",
             defaultValue: "idontthinksuchalongemailmakessense@isomorphic.com"
            }
        ]
    });
    
    isc.DynamicForm.create({
        ID: "exampleForm4", canEdit: false, readOnlyDisplay: "static",
        width: 250,
        titleWidth:"100",
        fields: [
            {name: "username",
             title: "Username",
             type: "text",
             required: true,
             width:"*",
             defaultValue: "bob"
            },
            {name: "email",
             title: "Email",
             required: true,
             type: "text",
             width:"*",
             defaultValue: "idontthinksuchalongemailmakessense@isomorphic.com"
            }
        ]
    });
    
    isc.VLayout.create({
        members:[exampleForm, exampleForm2, exampleForm3, exampleForm4],
        membersMargin: 20
    });
    Click image for larger version

Name:	Width.png
Views:	56
Size:	23.5 KB
ID:	255107

    I'd expect the width of the last DynamicForm to be 250px as well. Somehow StaticTextItem does not respect the width:"*", it seems to me.

    Best regards
    Blama

    #2
    See FormItem/DynamicForm.clipStaticString

    Comment


      #3
      Apologies, clipStaticValue is the attribute

      Comment


        #4
        Hi Isomorphic,

        thanks a lot. Working like a charm.

        Best regards
        Blama

        Comment

        Working...
        X