Hello,
Thank you in advance for any feedback.
Hi @m-townsend and welcome to the community
This is all correct! Congratulations!
For the name
attribute you used a hyphen once and underscores three times. I would choose one or the other for all of them.
Have a nice day,
Michael
Hi @mikoMK,
Thank you for taking the time to review, much appreciate the comments.
I was intentionally trying to make a distinction between the name and id. I did notice that most examples for this used the same values. I was thinking that if they were meant to have the same values then there would not be two attributes needed. The id attribute seems to be more for client-side html and js targeting, while name is for collecting data for the back-end. It made sense to me that you would want to differentiate between the two functions they are serving with some naming convention. The form will collect the names, so no need to worry about that, but for my own sanity when I target a name attribute instead of an id. I am more than likely overthinking it. haha
Anywho, that was what I was thinking at the time. I will look more into it, just so I have a better understanding on standard conventions.
Thank you,
Michael
That’s exactly right. And making a distinction between id
and name
is totally fine. What I meant is that you once used name="user-name"
(hyphen) and three times name="user_age"
, name="user_comment"
and name="user_email"
(underscore). That feels inconsistent.
I totally missed where I did that for one of the inputs. I see what you are saying now. Thank you for pointing it out.