ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Form fields - retain data if you miss a required field and have to go 'back'?

March 18, 2009 4:57pm

Subscribe [3]
  • #1 / Mar 18, 2009 4:57pm

    Brian M.

    529 posts

    Hopefully this is something easy.  Until recently I never noticed that in just about any browser besides Safari, if you miss a required field and have to go back you lose all the data you previously entered. It happens using the back link in the validation error message or by using your browser back button.

    What am I missing?  Surely there’s a way to retain that info without having to resort to storing session variables and putting them back in the forms with PHP?  I’ve got a client who has multiple long forms, and users are annoyed if they miss something (not uncommon) and have to go back and re-enter tons of data.

    Thanks!

  • #2 / Mar 18, 2009 7:33pm

    Shannon Smith

    161 posts

    Hey Brian,

    I think if it’s doing that for you, something is broken. I had a similar problem on the last site I worked on. Basically, I found out that LG Polls was creating the problem for me and, according to Leevi, he thought there was a bug in EE that sometimes caused a parsing error that would stop the form from retaining the data. He didn’t have time to look at it then and I ended up not using LG Polls because I didn’t want to lose form data if something got missed. You could try disabling extensions and see if that will make the problem go away. Interesting that it works in safari. I never tried that the time I was having the problem.

    Maybe asking Leevi about the problem would be worth doing as well. I’m not sure if he ever pursued anything with it, but I got the feeling he didn’t think it would happen all the time with LG Polls. Just in some cases… mine being one of them. Regardless, if I disabled all extensions but that one, it still didn’t work.

    Hope this helps,
    Shannon

  • #3 / Mar 18, 2009 7:35pm

    Shannon Smith

    161 posts

    Just thought I’d mention that another way to ensure it works is to validate on the same page using javascript… then they never get sent to the EE page in the first place (unless of course they have javascript disabled). I’ve done that on the site I’m working on now. Spry form validation is really quite easy to implement and use and there are UI benefits… Almost as easy to work with as EE.

  • #4 / Mar 18, 2009 8:45pm

    Mark Bowen

    12637 posts

    Another fantastic one which I always use is Live Validation.

    I simply love that one as it works on file browser fields too and also offers regex! Brilliant!

    Best wishes,

    Mark

  • #5 / Mar 18, 2009 10:17pm

    Brian M.

    529 posts

    Unfortunately this client is a non-profit with a budget of 0, so I have to keep things as no-frills (no-time) as possible.  I actually am using LG Polls (from at least a year ago so it’s probably out of date now).  I’ll try disabling that and see what happens.

    Thanks - I didn’t think that was normal behavior!

  • #6 / Mar 19, 2009 1:44am

    Shannon Smith

    161 posts

    I know what you mean about the extra time involved to add in js validation… it can be fairly time consuming! Exactly why I didn’t do it on the site I had the problem with.

    If it is LG Polls, the version I was using I bought sometime in December I believe, so I don’t know if there has been an update. Might be something to bring up with Leevi again. I think he’s been a bit busy lately though, so I don’t know if he’ll be able to address this one. Still interesting that it works with Safari.

    After you recently were such a help to me with my “Checkboxes” and Stand Alone Edit Form trouble Brian, I hope I’ve managed to be of help for you on this one! Thanks again for the help with that. It’s working really well with the php code you gave me.

    Thanks Mark! That validation method looks pretty interesting. I may just check that out!

  • #7 / Mar 19, 2009 2:08am

    Shannon Smith

    161 posts

    I just confirmed that I had purchased the latest version of LG Polls, so the problem has not been fixed yet. The version I have is 1.0.6.

  • #8 / Mar 19, 2009 9:20am

    Brian M.

    529 posts

    Shannon I didn’t recognize you - you’re looking a little green around the edges!

  • #9 / Mar 19, 2009 11:15am

    Shannon Smith

    161 posts

    LOL! I think it might be because I eat a lot of Green Foods Health Supplements. Such strange changes that is making…

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases