Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: Need to save input from a select statement

  1. #1
    Join Date
    May 2007
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Need to save input from a select statement

    1) Script Title:
    Recall Form Values Script II

    2) Script URL (on DD):
    http://www.dynamicdrive.com/dynamici...mremember2.htm

    3) Describe problem:

    I'm a volunteer for a non profit (Asperger's Association of New England), and they've asked me to make a web-based questionnaire for their users. I need to save the user's input because they are likely to fill out more than one questionaire. Users need to use a select statement to choose their state/province, and I really need to preserve it for them on future accesses to this form.

    I noted that RFVII does not save the index value for a select statement, so I've been trying to add that. Unfortunately, I'm not very proficient with JavaScript, and I've struggled for 3 solid days now with nothing to show for it. Is there any chance, please please, that RFVII could be made to save (and restore) the selected index in a select statement? I'd appreciate it greatly.

    Thanks in advance
    Last edited by Mareid; 05-28-2007 at 08:38 PM. Reason: typo

  2. #2
    Join Date
    Feb 2007
    Posts
    293
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    You would need to set a cookie for the selected information. This script gives you some more options:

    http://www.irt.org/articles/js025/
    Last edited by Veronica; 05-29-2007 at 01:59 PM.

  3. #3
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Why not do it server-side?
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  4. #4
    Join Date
    May 2007
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thumbs up

    Quote Originally Posted by Veronica View Post
    You would need to set a cookie for the selected information. This script gives you some more options:

    http://www.irt.org/articles/js025/
    Veronica this is exactly what I need. Very clear explanation, I think I can do it with this as a starting point. Thank you Thank you

  5. #5
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    It really should be saved and restored server-side. Especially since you're doing server-side processing of the data anyway, I see no reason to do it using Javascript, which is a much less accessible method.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  6. #6
    Join Date
    May 2007
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I don't know how to do it server-side, I'm not a web programmer. I can barely cope with Javascript, as I mentioned. I have no idea whether it would be allowed on their server anyway. I'm not saving anything on the server, and the data is not processed, it's just sent to them via email.
    Last edited by Mareid; 05-31-2007 at 01:00 AM.

  7. #7
    Join Date
    May 2007
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Sigh...Veronica that was a great site for the Java script but it turns out that if your form has a method (e.g. Form Method="Post" blah blah) it doesn't work. Took me a while, by trial and error to find out that was the problem. Anyone have any other suggestions?

  8. #8
    Join Date
    Feb 2007
    Posts
    293
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Other than the fact that it didn't have a way to save selected options, did the DD script you mentioned in your first post work for you? Also, how are you getting the info emailed to the people when they submit it?
    Last edited by Veronica; 05-31-2007 at 01:15 AM.

  9. #9
    Join Date
    May 2007
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I'm using a version of Formmail that I found on the web. (http://www.tectite.com/wizards/fmconf.php) and I think the version of cookie saving that I was using did save...but I'll have to go back and test again, I've been through so many iterations that I"m not positive.

    Update: Yes it does work, on text fields. That's all I'm saving at the moment. If I can't figure it out, I'll just make them put in the state by typing. It's not as if it's all that hard
    Last edited by Mareid; 05-31-2007 at 01:41 AM.

  10. #10
    Join Date
    Feb 2007
    Posts
    293
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I'm playing around with the DD script to make it work with selected options. Check back tomorrow and I'll let you know if it works. It should, but...

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •