Home › Forums › JavaScript › Submit to reveal? Simple form that carries over content…
- This topic is empty.
-
AuthorPosts
-
June 21, 2015 at 7:08 am #204034misterdixParticipant
So. I’d like to have a simple 4 question form. A user enters 4 values into said form. When they hit submit, it keeps those values and shows what the ‘best practice’ values would be next to it, with more content below.
So it’s like a comparison form see…
Is this easy java action? Also I’m a really crappy coder that would definitely need some guidance.
June 21, 2015 at 3:02 pm #204040PoddersParticipantHi @misterdix
What code do you have in place already? Can you create a pen to show what the issue is you’re having?
June 21, 2015 at 7:37 pm #204043nkriscParticipantThere’s probably 100 ways you could accomplish that. You’ll need to be more specific and ideally share what code you’ve got so far.
June 22, 2015 at 10:01 am #204064misterdixParticipantAt this point i’m starting with a blank canvas. I’m trying to figure out if it’s something I can do with relative ease or not. I don’t generally code from zero, but tend towards manipulating existing code and bending it to my will, albeit poorly.
So, with that, I humbly ask for a potential solution to my need for a ‘reveal’ here in the forum. I live in Vermont and can happily reward someone with crazy good beer. :)
So to be more specific…
it basically would look like:
text blurb – four questions with space for the browser to enter values. and when they hit submit, those values stay and the information is revealed. the information is the same regardless of the values that is input, so the input areas are ‘stupid’ as it were and there is no deeper logic to it than that. is that helpful?
June 22, 2015 at 12:30 pm #204069Paulie_DMemberI’m confused as to what it is you expect the output to be.
Without some kind of database being interrogated I don’t see this working… And even if you had such a database it would, presumably, be your opinion of what “best practice” actually is, especially since that it is an entirely subjective thing.
Basically, I am not sure what it is you are trying to achieve.
June 22, 2015 at 1:08 pm #204070misterdixParticipantI’m really just looking for the simplest solution. I don’t even think a dB is necessary because it’s just carrying over 4 ‘answers’ to what would be a second page of information.
I have no need to even capture the answers in any meaningful sense, just for them to appear on the next page along with more info.
June 22, 2015 at 1:30 pm #204071misterdixParticipanta little browsing stumbled me to here:
https://stackoverflow.com/questions/23260966/is-html5-localstorage-appropriate-to-store-input-field-valuesis localstorage a potential cure to my concept? could i use it to ‘hold’ the four values and display them again on a second page?
June 22, 2015 at 7:09 pm #204076nkriscParticipantIf you don’t need to save the date except to show it on the next page you could pass it to the next page with a query string and then reading it from the URL on the next page with some JS.
Or you could use a cookie.
Or you could use local storage.
Or it could all be on the same page and just template it with JS.
Or…
June 24, 2015 at 12:09 pm #204135Alan CParticipantOr modify the URL to carry the data over! A bit archaic but super simple =D
-
AuthorPosts
- The forum ‘JavaScript’ is closed to new topics and replies.