I have a 2 steps form for sign up users.
Now I want when the users one time complete the first steps for next time the first step isn't show .
TNQ
I have a 2 steps form for sign up users.
Now I want when the users one time complete the first steps for next time the first step isn't show .
TNQ
You can use a hidden input field (tutorial on input fields) or a hidden label or data attributes (tutorial on data attributes).
Sample code:
var id = 1; // the ID I want to keep among steps
$("#myHiddenField").val(id);
...
// at step 2, for example
var idStep1 = $("#myHiddenField").val();
These value will be stored in the HTML so if the page is refreshed you'll lose the data. If you want to keep it even after a refresh and you don't want to use cookies, you can save the values in the URL (you can read more about this in tutorial on url hash).
Example of hash on URL:
a) Step 1 is not visible anymore.
b) Step 2 is visible.
c) URL is updated, appending extra information like an ID (www.mysite.com#step2?id=1)