Initially I intended to file this as an issue on the official Github 
repository for Go but were referred to this page. This is the first time I 
am posting. 

I am writing a web server using Go and trying to parse form data from 
client. The form is sent using the POST method and I am trying to get the 
value on the server using the following code:

entry.Title = r.FormValue("title")

which works just fine when the input field on the client uses this code:

<input type="text" placeholder="Click to edit title" name="title">

i.e. when using the name attribute. According to W3, however, the use of 
the name attribute is deprecated 
(https://www.w3.org/TR/html401/interact/forms.html#adef-name-FORM) and 
should be replaced with an id attribute.  When I do this however, FormValue 
fails to recognize the "title" value anymore. I think this would be a bug 
perhaps or maybe there are some other way of getting form values by id that 
I have missed.

Regards
Linus 

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to