Issue with submit button not working on the first click

Hi all,
I am created very simple form with submit button without any dependency on form but when try to click on submit button it is not submitted on first time.. It is submitted on second time.. Why it is behaves like this..
Thanks in advance.

OriginalPostID-218270

OriginalPostID-218270

  Discussion posts and replies are publicly visible

Parents
  • @bhanuprakashm One scenario I could predict at the moment is as follows:
    a. Button Widget SAIL Component is being used and 'submit' attribute of it is dependent on a boolean variable.
    b. The boolean variable provided to the 'submit' attribute is being updated in the 'saveInto' attribute of Button Widget SAIL Component.

    As per the above mentioned scenario, the Button Widget Component waits for the boolean variable to evaluate to true, but the boolean variable won't be updated until and unless an interaction with the Button Widget Component is being made. This way we should make at-least one interaction. And when we click the Button Widget Component again, as the boolean variable is already updated by this time and the form will be submitted if the variable is updated to true in the previous interaction. Simply speaking, the variable(s) being used in condition aren't really useful until and unless we push values into them.

    If above is the case, one way to overcome this situation is, assign the logic(whose resultant value is being pushed into a variable) to the 'submit' attribute of Button Widget SAIL Component rather than pushing the logic into a variable and making use of the same variable thereafter.

    To the best of my knowledge, I could say that it's just reacting based on the way you coded the form. As you are saying that you haven't written any logic for the Submit Button, it would be good to attach the code here.
Reply
  • @bhanuprakashm One scenario I could predict at the moment is as follows:
    a. Button Widget SAIL Component is being used and 'submit' attribute of it is dependent on a boolean variable.
    b. The boolean variable provided to the 'submit' attribute is being updated in the 'saveInto' attribute of Button Widget SAIL Component.

    As per the above mentioned scenario, the Button Widget Component waits for the boolean variable to evaluate to true, but the boolean variable won't be updated until and unless an interaction with the Button Widget Component is being made. This way we should make at-least one interaction. And when we click the Button Widget Component again, as the boolean variable is already updated by this time and the form will be submitted if the variable is updated to true in the previous interaction. Simply speaking, the variable(s) being used in condition aren't really useful until and unless we push values into them.

    If above is the case, one way to overcome this situation is, assign the logic(whose resultant value is being pushed into a variable) to the 'submit' attribute of Button Widget SAIL Component rather than pushing the logic into a variable and making use of the same variable thereafter.

    To the best of my knowledge, I could say that it's just reacting based on the way you coded the form. As you are saying that you haven't written any logic for the Submit Button, it would be good to attach the code here.
Children
No Data