Skip to content Skip to sidebar Skip to footer

Dynamic Data Disappearing On Adding

I've a form to add External User in which 2 of the fields are not mandatory by default. However, they become mandatory only if one of those fields are filled out. On clicking the a

Solution 1:

The main issue is in the $("#extUserForm").submit callback where you have:

returntrue;

This will make the default form-submission effect kick in, i.e. the page will navigate to the form's action attribute, or if there is none (as is your case), the page will reload. That is why you briefly see the entry on the page, just before the page is reloaded, and everything starts from scratch.

So, you must stick with:

returnfalse;

NB: there was a variable name mismatch: dataFilled is not the same as toolFilled, ... same for dataUnfilled.

Post a Comment for "Dynamic Data Disappearing On Adding"