jQuery button validate part of a form at a time

前端 未结 4 532
隐瞒了意图╮
隐瞒了意图╮ 2020-12-30 05:48

Sorry if I did not explain my problem clearly.

  1. I have a form with multiple tables for users inputs.
  2. I use next and back bu
4条回答
  •  悲哀的现实
    2020-12-30 05:56

    You are calling the validate method for each table every time the next button is clicked. Instead, you only want to call validate if the table is visible. Since you are already tracking which table should be visible with your curr_ind, I'd suggest using it to know which table to validate and only calling validate for the visible table.

提交回复
热议问题