• If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Announcement

Collapse
No announcement yet.

Issue with form with textfields set to allowBlank: false

Collapse
X
 
  • 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

    Comment


    • #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!

      Comment


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

        Comment

        Working...
        X