No announcement yet.

Issue with form with textfields set to allowBlank: false

  • Filter
  • Time
  • Show
Clear All
new posts

  • Issue with form with textfields set to allowBlank: false

    I have created many forms over the years where fields are required. So I set the allowBlank property equal to true. Then I set the formBind: true on the submit button. I also have a cancel button that allows the user to just quit and go back.

    For some unknown reason, when the cancel button is clicked, it displays the error message for the 1st text file being required, rather than executing the cancel function.

    If you then click cancel a second time, the cancel function executes. I've never had this before so I'm stumped..

    I've attached the form panel code and screen shots (rather than copy & paste here)

    Any suggestions?
    Attached Files

  • #2
    Seeing the error makes sense if the field has focus, and then you hit cancel. However, I'm not sure why, when you click cancel, the action is not being called.

    Do you have a handler on the button? I assume some custom code is at play


    • #3
      The button doesn't have a true handler function. It does have a listener & function in a controller for click. I do set focus on that field when the form is displayed. I'll try turning that off and see if that solves the issue. Thanks!


      • #4
        Yep. that did the trick! You da Man!