Questionaire

I’ve been reading through this entire thread. Working on a project of my own and I was able to create my form using HTML. Now I want to answer my yes/no questions and save that data for myself so that I can run these answers through additional code.

@stetim94 now that I have my HTML code:

  1. What software or where can I go to publish/test this form so that I can answer the question and start storing my data?
    2)Once answered, I would hit the submit button, where can I send those answers (data) to save them? Any recommendations on servers or where to rent them from?

Appreciate your help! You have been great help throughout this entire thread!

I think its important to understand the extra layers/complexity needed to achieve your goal

You might want to consider to use JavaScript first, this will prevent you from saving the questions, but you could run additional code and display this to the user

if you really want to save the questions, you will need to integrate back-end. There are a lot of options here, some of the possible programming languages: python, ruby, go, rust, php and more. Depending on the programming language, you will need a web-server (but depends on your programming language choice)

then you need to decide how you want to save your data (using files, using a database)

All this can be done/installed on your computer.

You should focus on developing first, and I think we should talk about deployment another time

So right now I have my form (HTML) with simple yes/no questions in the form of radio buttons. When a yes answer is given, I want to calculate that as a 1 value so that I can add all of the yes answers up and produce a total. That total will then put you in a class of A, B, or C. The classes have ranges like 1-5 (C), 6-8 (B), 9-10 (A).

I’m currently stuck trying to figure out how I can record a yes answer as 1 point.
Do you know how I can achieve that?

Like i described in my answer, then Javascript is the most logical choice. Javascript is scripting languages which can interact with a webpage. Html can’t do all these calculations.

Do you have an example showing how HTML and Javascript can be used to interact with each other?

I’m having trouble combining the two

I’ve been practicing in codepen (hopefully its ok that I reference this) but can’t seem to get the JS side to run any functions from the questionnaire created in HTML

Actually, I prefer that you shared the codepen. Then I can get a better idea of your current skill level and your struggles.

so this is the full form…

First I just want a yes answer to equal the value 1. Then from there, I’ll add up all the 1’s to get a total. Disregard the text boxes and drop downs for now.

*not fully complete, just working on the basic functionality so that I can expand on it

I don’t see any JavaScript code at all:

the entire Javscript file (right hand-side) is just completely empty?

Deleted in error since it wasn’t working.

Here is the code that I was trying to use for all yes/no questions but changing the ID and variable per question

The JS code here was specifically for the Q “Have you lost more than 10lbs in the past year?”

Based on your code, I think you are in over your head. I would recommend to learn more about Javascript first, you need this basic if you want to understand DOM interaction

1 Like

Gotcha, will do.
Currently working through the codeacademy courses. Will I be able to get a full understanding of Java through codeacademy or at some point will I need to transition else where for further learning?

Java? That is a different programming language altogether.

Been a while since I have done the codecademy course, not sure how much content there is when it comes to DOM interaction using Javascript

Sorry, I meant javascript haha

But ok thanks for all of your help! I’ll keep an eye out for information/courses on DOM