These are chat archives for FreeCodeCamp/HelpFrontEnd

18th
Oct 2018
Brad
@bradtaniguchi
Oct 18 2018 00:55
@DSlatkin I know support for sticky on mobile isn't 100% for all mobile browsers, so that might be why??
https://developer.mozilla.org/en-US/docs/Web/CSS/position#Browser_compatibility
Augustas
@AugustasV
Oct 18 2018 12:34
I can't pass Survey page. Problem with radio buttons group . 3. Inside the form element, I can select a field from one or more groups of radio buttons. Each group should be grouped using the name attribute.
  <input type="checkbox" id="checkboxes" name="test" value="test1">select1</input>          
   <input type="checkbox" id="checkboxes" name="test"  value="test2">select2</input>

<input type="checkbox" id="checkboxes" name="test"  value="test1">select1</input>          
   <input type="checkbox" id="checkboxes" name="test"  value="test2">select2</input>
Eric Weiss
@eweiss17
Oct 18 2018 12:38
@AugustasV are they in a form?
Augustas
@AugustasV
Oct 18 2018 12:39
yes they are. This is full page https://codepen.io/AugustasV/pen/rZpdBB
Eric Weiss
@eweiss17
Oct 18 2018 12:49
the id of your inputs should be unique
just change id to class and it's fine
make the names unique too...
use type = "radio" instead of checkbox. that is what that test is looking fori believe
Christopher McCormack
@cmccormack
Oct 18 2018 14:52
I believe for checklists you want the name to be the same
Augustas
@AugustasV
Oct 18 2018 16:49

I did like blind test, wrote like that

<input type="checkbox" class="checkbox" name="checkbox" value="checkbox">checkbox</input>          
   <input type="checkbox" class="checkbox" name="checkbox" value="checkbox">checkbox</input>      

<input type="checkbox" class="checkbox" name="checkbox" value="checkbox">checkbox</input>            
   <input type="checkbox" class="checkbox" name="checkbox" value="checkbox">checkbox</input>

it should work in that way or not?

Christopher McCormack
@cmccormack
Oct 18 2018 17:16
@AugustasV probably but you don't want text between your input tags, it's self closing, and the value should be unique
@AugustasV use the label tag instead, it's good for accessibility, and when you click the label it also affects the input
TCzechowski
@TCzechowski
Oct 18 2018 19:47

Hey Guys! I don't have any problem with code right now, but I have a question.

Do I have to worry if my code is not perfectly written in freeCodeCamp tasks or should I just proceed to the next one if it works correctly?

What I mean is that my function works correctly but when I went to the "Get Hint" section, the solutions posted there were different from my solution.
Brad
@bradtaniguchi
Oct 18 2018 19:53
@TCzechowski There's a saying, "It's not enough for the code to work" so yes technically you can move on, but I wouldn't for a few reasons. 1. Your here to learn, seeing how others solve the problem is an EXCELLENT way to learn better/alternative ways of solving a problem. 2. I personally believe there is 1 optimal way to solve a problem that not only works, but is readable, simple, documented, efficient and arguably can't be improved upon. Odds are the first solution you find wont be the best solution as such refactoring/optimizing you code should be done earlier rather than later. Id consider readability and simplicity to be the most important, as long as its not horridly inefficient.
and all I just said should be applied to all code you write, not just FCC.
TCzechowski
@TCzechowski
Oct 18 2018 21:04
@bradtaniguchi That's why I asked if I should move on or should I actually study the code and try to do it the "better" way :) Problem is that I don't fully understand the solution provided by FCC but hey, I'll try to dig deeper / do research and understand it eventually :)
Brad
@bradtaniguchi
Oct 18 2018 21:07
@TCzechowski Yes, you can learn a lot from the solutions by looking up anything you don't understand in them. It's also good to at least know there's alternatives to learn later if you can't learn them now :D
TCzechowski
@TCzechowski
Oct 18 2018 21:13
@bradtaniguchi Sometimes it's like learning new language - I understand random words in a sentence but can't understand the full meaning of it :P
this meme says it all :D
Brad
@bradtaniguchi
Oct 18 2018 21:16
@TCzechowski haha yes