when using save and exit , can i put the user where they left off

By: Andrew McSpadden | Asked: 10/10/2024
ForumsCategory: How-towhen using save and exit , can i put the user where they left off
Andrew McSpadden asked 1 week ago
right now we are using the "save and exit" button (creates a submission - vs saving the form as a draft) - and allowing the user to edit the submission. we are doing this in order to support multiple drafts.   when they go to view/ edit the submission it just takes them to the beginning of the form. is there any way I can put them back on the page where they left off? 
1 Answers
Rob LeVineRob LeVine answered 1 week ago

You could use jQuery. When the form is in edit mode, traverse the DOM to find the first empty field and set it as the focus element (and scroll to it). If all the fields are required, that'll get you where you want to go. If not, you may want to find only the required fields or use some other applicable logic.

Andrew McSpadden replied 1 week ago

there arent any required fields on this form .

Rob LeVineRob LeVine replied 1 week ago

Then "left off" is kind of impossible to judge. The best option I can think of is focusing on the first blank field.

Andrew McSpadden replied 1 week ago

that might work .. thanks for the insight

Andrew McSpadden replied 1 week ago

my form is multiple pages.. do you think it would be possible to track which save and exit button was clicked?

Rob LeVineRob LeVine replied 1 week ago

As a former manager of mine used to say, "It's software, we can do anything." I imagine that again using jQuery, you'd be able to write the current page back to a hidden field and use it later.

Making the Best WordPress Plugin even better - Together

Take on bigger projects with confidence knowing you have access to an entire community of Formidable Experts and Professionals who have your back when the going gets tough. You got this!
Join the community
crossarrow-right