Announcement

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

    ToggleItem value not included in in form values

    SmartClient Version: SNAPSHOT_v13.1d_2024-11-07/AllModules Development Only (built 2024-11-07)

    Hello, I've just noticed that the value for a ToggleItem is not included in the values of the form. Please try this test case:

    Code:
    isc.VLayout.create({
        membersMargin: 5,
        members: [
            isc.Header.create({ title:"Standalone Toggle" }),
            isc.ToggleSwitch.create({ ID:"toggleSwitch" }),
            isc.LayoutSpacer.create({ height:20 }),
            isc.Header.create({ title:"Toggle in a form" }),
            isc.DynamicForm.create({
            ID:"testForm",
                fields: [
                    { name:"toggle", title:"Enable Noise Cancellation",
                     wrapTitle:false, editorType:"ToggleItem" }
                ]
            })
        ]
    });
    you can see that testForm.getValues() doesn't contain the value for toggle, both on or off. In my application, I also see that saveData is always sending false as a value for the ToggleItem.

    #2
    Thanks Claudio - this one's been fixed for tomorrow's builds.

    Comment


      #3
      SmartClient Version: v13.1p_2024-11-11/AllModules Development Only (built 2024-11-11)

      I see it's fixed, thank you very much

      Comment


        #4
        SmartClient Version: v13.1p_2025-02-27/AllModules Development Only (built 2025-02-27)

        Firefox, Chrome on MacOS

        Hello, I think I've found another related problem, please try this test case:

        Code:
        isc.DynamicForm.create({
            ID: "testForm",
            fields: [
                {name: "aBoolean", type: "boolean", defaultValue: true},
                {
                    name: "toggle", title: "Enable Noise Cancellation",
                    defaultValue: false,
                    editorType: "ToggleItem"
                }
            ]
        })
        then execute:

        Code:
        testForm.editNewRecord({});
        testForm.getValues();
        you'll see that it returns:

        Code:
        {aBoolean: true}
        instead of:
        Code:
        {aBoolean: true, toggle: false}

        Comment


          #5
          hi Claudio - we've made a change to address this. Please retest with a build dated February 28 or later.

          Comment


            #6
            SmartClient Version: v13.1p_2025-02-28/Enterprise Deployment (built 2025-02-28)

            I see it's working now, thank you very much

            Comment

            Working...
            X