Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.3] Resolve issues with multi-value select elements #15436

Merged
merged 1 commit into from
Sep 16, 2016
Merged

[5.3] Resolve issues with multi-value select elements #15436

merged 1 commit into from
Sep 16, 2016

Conversation

leewillis77
Copy link
Contributor

@leewillis77 leewillis77 commented Sep 15, 2016

This PR implements @spikerok's suggestion from #10514 (comment) to strip [] out of element names.

I've been running with this for a week or so and everything looks OK.


Closes #10514.

@GrahamCampbell GrahamCampbell changed the title Resolve issues with multi-value select elements. Fixes #10514 [5.3] Resolve issues with multi-value select elements Sep 15, 2016
@taylorotwell
Copy link
Member

Is it possible to have a test or something for this?

@themsaid
Copy link
Member

Here's a complete test case:

<form action="/" method="post">
    {{csrf_field()}}
    <select name="hills[]" multiple>
        <optgroup value="Testing">
            <option value="1">Testing 1</option>
            <option value="2">Testing 2</option>
        </optgroup>
    </select>

    <button>Submit</button>
</form>

Doing:

public function testBasicExample()
{
    $this->visit('/');

    $this->select([1,2], 'hills[]')
    ->press('Submit');
}

Will throw an error Unreachable field from Symfony\Component\DomCrawler\FormFieldRegistry

@taylorotwell taylorotwell merged commit d29cb13 into laravel:5.3 Sep 16, 2016
@iWader
Copy link
Contributor

iWader commented Dec 6, 2016

I'm having some issues with the Unreachable field exceptions I keep getting.

Is it possible to test a form with a multiple select?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants