headzoo/surf

Is it possible to submit form if any form field has no "name" attribute?

Closed this issue · 3 comments

Since the current implementation uses the field's name attribute to create the url.Values , which is correct from the W3C standards, is it maybe possible to submit a form event if the field has no name attribute?

Say we have this

<form class='some-form'>
        <textarea id='someid'></textarea>
       <button id='someid' type="button" onclick="someJSsubmit()"></button>
</form>

Is it possible that i could populate the textarea and click the button after?

I have form with name attribute but it isn't detected
Here is my website

You may try:

fm, _ := bow.Form("form.some-form")
fm.Input("textarea#someid", "your desired value")
if fm.Submit() != nil {
panic(err)
}

I can confirm that I had similar issue.