HTML Forms - a little help? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

HTML Forms - a little help?

Hi All Hoping the community can point me in the right direction regarding HTML Forms. Looking to create a Form which generates a consistent paragraph of text where certain aspects can alter determined by the selections within the Form. For instance, an option of ‘Post’ or ‘Email’ as Radio Buttons will produce the text, ‘Documents sent by post’ as part of a wider body of text. I’m comfortable creating the Form itself, however, as a novice I am unsure how best to generate the resulting text? Cheers

25th Nov 2018, 8:26 PM
Casey
Casey - avatar
2 Answers
+ 2
I think you should use JavaScript for this purpose. You need to read the values of input field through JavaScript and then store those values in variables. Then, you need to define a paragraph to be displayed after onclick on submit button. You will need to use event listener and then modify your paragraph with the variables which have stored input values. This can be the whole algorithm. Give it a try. Hope this will help. If you need further help, try once by yourself. Post that code and we will help you through it.
25th Nov 2018, 11:40 PM
Arushi Singhania
Arushi Singhania - avatar
+ 1
Thank you, Arushi. I will look into this.
25th Nov 2018, 11:46 PM
Casey
Casey - avatar