Announcement

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

  • vikashdwi
    started a topic Not able to get Text value in editorExit method

    Not able to get Text value in editorExit method

    Hi,

    Please take a look into below code, here in editorExit method, I'm not able to get value in this.vlaue(); even I've tried myForm.getValue('clientCode') and getting "[TextItem ID:clientCode name:clientCode]" in the value.

    Please help me to get the text value in editorExit method.

    Code:
    isc.DynamicForm.create({
        ID:"myForm",
        zIndex:-2,
        autoFocus:true,
        selectOnFocus : true,
        dataSource:"mysetupformDS",
        showErrors:function ()
        {
            validateMandatoryFields(this);
        },
        fields:[
            {
                name:"clusterCode",
                ID:"clusterCode",
                length:15,
                required:true,
                wrap:false,
                title:i18n['masters.client.clientclustersetup.clustercode'],
                editorType:"text",
                transformInput: function (f, i, v, ov) {if(v!=null){return v.toUpperCase()}},
    
                editorExit:function()
                {
                    var value = this.getValue(); // Please take a look into this line.
    
                }
            }
        ]
    })

  • vikashdwi
    replied
    `Thank you Isomorphic,

    We've resolved this issue at our end, thanks for your support.


    Leave a comment:


  • Isomorphic
    replied
    A follow up on this: We're actually not reproducing this issue on our end with your test case.
    The test code isn't runnable exactly as is - it references a DataSource we don't have, but here's a standalone version with the dataSource removed:
    Code:
    <script>
      isc.DynamicForm.create({
          ID:"myForm",
          zIndex:-2,
          autoFocus:true,
          selectOnFocus : true,
          fields:[
           {
            name:"clusterCode",
            ID:"clusterCode",
            length:15,
            required:true,  
            wrap:false,
            editorType:"text",
            transformInput: function (f, i, v, ov) {if(v!=null){return v.toUpperCase()}},
              editorExit:function()
            {
              var value = this.getValue(); // Please take a look into this line.
              isc.say("VALUE:" + isc.Log.echo(value));
            }
           }
         ]
      })
      </script>
    We're seeing the value correctly reflected on editorExit in our testing.

    Can you confirm whether this issue is still happening for you, and if so, whether you can reproduce it with our above snippet / whether you could share the dataSource definition so we could see what might be causing this.
    Also which SmartClient build are you seeing this problem on?

    Thanks
    Isomorphic Software

    Leave a comment:


  • Isomorphic
    replied
    Your transformInput must return a value in both cases, not just if value is non-null.

    Leave a comment:

Working...
X